A theorem on the factorization of matrix polynomials