Study of the low-mass diffractive system produced in pp collisions at 12 and 24 GeV/c