```
def uniquePaths(self, m, n):
"""
:type m: int
:type n: int
:rtype: int
"""
return math.factorial(m+n-2)/(math.factorial(m-1)*math.factorial(n-1))
```

We have m-1,n-1 identical things to arrange, this can be done in (m+n-2)!/(m-1)!(n-1)!