Factorisation in the inclusive reactions π±p → + X and K−p → Λ + X