#d2460. 走路

走路

Walking

Problem Description

There is a very long number line, and you start at position 00. You are going to take nn steps. On the ii-th step, you may move right by aia_i or by bib_i.

After nn steps, for each position from 00 to mm, can you reach it?

Input Format

The first line contains two integers n,mn, m.

The next nn lines each contain two integers ai,bia_i, b_i.

Output Format

One line consisting of a total of m+1m+1 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, 1≤n≤1001\leq n\leq 100, 1≤m≤1051\leq m\leq 10^5, 1≤ai,bi≤10001\leq a_i,b_i\leq 1000.