Passage : Direction: information given below and answer the question that follow.
The result of an exam is given below. Out of 1000 students who appeared
(i) 658 failed in Physics
(ii) 166 failed in Physics and Chemistry
(iii) 372 failed in Chemistry, 434 failed in Physics and Maths
(iv) 590 failed in Maths, 126 failed in Maths & Chemistry
Find the number of people who failed in (assuming that none is passed in all subjects.

We have the following equations:
a+ b + c + d + e + f + g = 1000
a + b + d + e = 658, b + d = 166
b + d + c + f = 372
d + e = 434 as in the figure.
d + e + f + g = 590, d + f = 126. Find the values
Physics or Maths but not in Chemistry.