Atomic Number definition: The number of protons within the nucleus of x atom.
Atomic Mass definition: The number of protons and/+ neutrons within the nucleus of x atom.
The given information states that the element has 8 protons and 8 neutrons in its nuclei with 8 electrons revolving around it. If the atomic number is 'the number of protons' and we have 8 given protons, our answer would be 8. If the atomic mass is protons + neutrons and we have 8 protons and neutrons, our answer for atomic mass would inevitably be 16.
Therefore
Atomic number: 8
Atomic mass: 16