#d2460. 走路
走路
Walking
Problem Description
There is a very long number line, and you start at position . You are going to take steps. On the -th step, you may move right by or by .
After steps, for each position from to , can you reach it?
Input Format
The first line contains two integers .
The next lines each contain two integers .
Output Format
One line consisting of a total of digits, each being 0 or 1 indicating whether that position can be reached. The digits are concatenated with no spaces in between.
Sample Input
3 10
1 2
2 6
3 3
Sample Output
00000011001
Constraints
For all data, , , .