• Time limit: 1.00 s
  • Memory limit: 512 MB

Uolevi is heading for holidays and needs some cash for the travel in the currency of the destination country. Luckily there are many currency exchange offices in his home town, and Uolevi is now thinking how much travel money he could accumulate. Help Uolevi to find the best exchange rate.

Input

The first line of the input contains four numbers:

  • n: the number of currencies being considered
  • m: the number of currency exchange offices
  • a: the index of the currency Uolevi holds
  • b: the index of the currency of Uolevi's holiday destination

The input then contains m lines each describing one currency exchange office. The ith of these lines contains three integers, a_i and b_i, and c_i. This indicates that for each unit of currency a_i, the exchange gives 10^{c_i/100} units of currency b_i. Note that the exchange rate is given in the logarithmic form, scaled by 100.

All currency exchange offices are one-directional, i.e. they allow only exchanging a_i into b_i, but not vice versa.

Output

Output one integer x such that the best exchange rate Uolevi can get to convert from currency a into b is 10^{x/100}, i.e. give the exchange rate in the logarithmic form, scaled by 100.

In case that Uolevi cannot convert currency a into b, output string "IMPOSSIBLE". If Uolevi can produce unbounded amount of money, output string "INFINITE MONEY GLITCH" as there is something horribly wrong with the local monetary market.

When the solution is finite, it is guaranteed that it can be represented in the logarithmic form.

Constraints

  • 2 \le n \le 1000
  • 1 \le m \le 10000
  • 1 \le a, b \le n
  • 1 \le a_i, b_i \le n for all 1 \le i \le m
  • -300 \le c_i \le 300 for all 1 \le i \le m

Example

Input:

3 3 1 2
1 2 -100
1 3 -100
3 2 200

Output:

100

Explanation: Uolevi has currency 1 and wants to get currency 2. He can directly exchange his money with rate 10^{-100/100} = 0.1 to currency 2. But by being clever, he can first exchange his money to currency 3 with rate 10^{-100/100} = 0.1, and then exchange that to currency 2 with rate 10^{200/100} = 100. In total, this gives him exchange rate 0.1 \cdot 100 = 10 = 10^{100/100}.