Pionization in pp interactions at 12 and 24 GeV/c