Inelastic intermediate states in proton-deuteron and deuteron-deuteron elastic collisions at the ISR