We know that :
Mass numbers = No. of protons + No. of protons + No. of neutrons
So, Mass number of X = 6 + 6
= 12
Mass number of Y = 6 + 8
= 14
Thus, the mass number of X is 12 and that of Y is 14
Now, X contain 6 protons, therefore, the atomic number of X is 6. Y contains 6 protons, therefore, the atomic number of Y is also 6. Since X and Y have the same atomic number (of 6) but different mass numbers (of 12 and 14), they are a pair of isotopes. Atomic number 6 is of carbon element. So, both X and Y represent carbon element.