Statistical Question (I believe...)

The following problem has become a mind block and any help would be appreciated:

*Of a group of one thousand students who did the examination for Mathematics as well as the examination for Statistics, it is known that 600 of them passed the Mathematics exam and 650 passed the Statistics exam. Moreover, 400 students passed both exams.*

(a) How many students failed both exams?

(b) How many students passed one and failed the other exam?

I am not sure if this falls into probability or statistics. I am trying to figure out a formula by which to solve the equation.

Thanks for any help,

Matty