Properties of Confined Hydrogen and Helium Atoms