General approach to the sign problem: Factorization method with multiple observables