Efficient reverse-factorization of a number given list of divisors

Given a number n and a list of divisors A, how can I efficiently find all the combinations of divisors that, when multiplied, yield to the number? e.g. n = 12 A = [2, 3, 4] Output: [[3, 2, 2], [2, …