You are given a sequence of fractions \frac{a_i}{b_i}.
Can you find a fragment of this sequence such that the product of its numbers is equal to x?
More formally, write a program that finds a pair of indices i, j (i \le j), such that \prod\limits_{k=i}^{j}\dfrac{a_k}{b_k}=x.
Input
The first line contains integers n and x (1 \le n \le 1000, 1 \le x \le 1000).
Each of the next n strings contain two integers a_i and b_i (1 \le a_i, b_i \le 1000).
The fractions are indexed starting from 1.
All fractions are irreducible.
Output
Output a pair of indices i, j with the required product.
If there are multiple such pairs, output the lexicographically smallest pair, i.e., with the smallest value of i, and in case of a tie with the smallest value of j.
If there are no such pairs of indices, output 0 0.
Examples
standard input | standard output |
---|
3 1
2 1
1 2
2 1
| 1 2
|
5 100
10 3
10 1
2 1
10 1
1 2
| 2 5
|
3 4
7 3
1 5
12 7
| 0 0
|