Just climb stair in 2D

```
class Solution:
# @return an integer
def __init__(self):
self.wayAtPos = {}
def uniquePaths(self, m, n):
if (m, n) in self.wayAtPos:
return self.wayAtPos[(m, n)]
if m < 1 or n < 1:
return 0
if m == 1 or n == 1:
return 1
self.wayAtPos[(m, n)] = self.uniquePaths(m-1, n) + self.uniquePaths(m, n-1)
return self.wayAtPos[(m, n)]
```