Momentum spectra of secondary particles produced in proton-proton collisions at 14.2, 19.2 and 24.0 GeV/c