Isotopes are defined as the atoms which have same number of protons but different number of neutrons of same element. Since the proton number is same, the atomic number also same. Hence the atomic number of Y is 8.
Mass number = atomic number + neutron number
18 = 8 + neutron number
Neutron number = 10
Hence, there are 10 neutrons in Y.