Multiple Scattering of Protons and Deuterons by Thick Foils