Factorization in the inclusive reactions pp → Λ + X++ and K+p → Λ + X++