Counting Paths
Turtle is in an \(N \times M\) grid and is currently on \((1,1)\). He wants to get to \((N,M)\) but can only move down and right.
How many distinct paths are there to get to his destination?
Input Specification
The first and only line contains two space-separated integers: \(N\) and \(M\) (\(1 \le N, M \le 1000\))
Output Specification
Print the number of disinct paths mod \(10^9+7\)
Sample Input
3 5
Sample Output
15
Comments