```
def getFactors(self, n):
"""
:type n: int
:rtype: List[List[int]]
"""
res = []
path = []
self.dfs(n, 2, path, res)
return res
def dfs(self, n, start, path, res):
if path and n >= start:
path.append(n)
res.append(list(path))
path.pop()
for i in range(start, int(n**0.5)+1):
if n % i == 0:
path.append(i)
self.dfs(n//i, i, path, res)
path.pop()
```