Mass number of X = Number of protons + Number of neutrons = 6 + 6 = 12.
Mass number of Y = Number of protons + Number of neutrons = 6 + 8 = 14.
These two atomic species X and Y have the same atomic number, but different mass numbers. Hence, they are isotopes.