#d1202. 路径计数2
路径计数2
Path Counting 2
Problem Description
There is an grid. Some cells are passable, and cells are obstacles.
You start at the top-left corner. In each step you may move down or right. Count the number of ways to reach the bottom-right corner.
Since the answer can be huge, output the result modulo .
Input Format
The first line contains two integers .
The next lines each contain two integers , the coordinates of the -th obstacle.
Output Format
Output one number: the answer.
Sample Input
2 1
2 1
Sample Output
1
Constraints
All data guarantee , , .