Letβs play a game. Given an initial number and two sequences , , you should get from to 0 as fast as possible. On each step, you are allowed to pick an index i and apply the following operation on the current number:
This way, youβll obtain the next number. You should find the minimum number of operations that would get you from to 0.
Input
The first line of the input contains 3 integers n, m, and (0 β€ n β€ 10, 0 β€ m β€ 100 000, and 0 < < m).
The next n lines contain a pair of integers (0 β€ , β€ ).
Output
The program should print the minimum number of operations to get from to 0. If itβs impossible to get to 0, the program should print Impossible.