```
import math
class Solution(object):
def getFactors(self, n):
return self.solve([], n, [], 2)
def solve(self, ret, n, sofar, start):
if sofar:
ret.append(sofar + [n])
for i in range(start, int(math.sqrt(n))+1):
if n % i == 0:
self.solve(ret, n/i, sofar+[i], i)
return ret
```