Atomic mass = number of protons + number of neutrons
Atomic mass of X = 6 + 6 = 12
Atomic mass of Y = 6 + 8 = 14
Both X and Y have the same atomic number (number of protons) but different atomic mass numbers (number of protons + number of neutrons). Therefore, they are isotopes.