Cross Sections for the Production of Helium and Long-Living Radioactive Isotopes by Protons and Deuterons