Which of these pairs of elements have the same number of valence electrons?

hydrogen (H) and helium (He)
sodium (Na) and potassium (K)
carbon (C) and oxygen (O)
boron (B) and beryllium (Be)