You are given an array of integers a_1,…,a_n. Find two indices i and j such that i\<j, a_i\<a_j, and the product a_i⋅a_j is as small as possible.
The input consists of several tests. The first line contains a single integer t --- the number of tests (1≤t≤104). Each of the following t lines describes one test.
Each test is generated using the following algorithm. The test is described by integers n, l, r, x, y, z, b_1, b_2 (2≤n≤107, −2⋅109≤l≤r≤2⋅109, 0≤x,y,z,b_1,b_2<232), where n is the length of the array.
First, the sequence b_i of length n is generated. Elements b_1 and b_2 are given. For i>2 let b_i=(b_i−2x+b_i−1y+z)mod232. For each i between 1 and n, a_i=(b_imod(r−l+1))+l (thus, −2⋅109≤a_i≤2⋅109).
It is recommended to use 64-bit integers to generate the sequence to avoid integer overflow.
The sum of n in all tests does not exceed 2⋅107.
For each test, print the smallest possible product a_i⋅a_j in a separate line. If there are no such i and j that i\<j and a_i\<a_j, print "IMPOSSIBLE".
Let us consider the generation of the array in the first test.
First, the sequence b is generated.
Then it is used to generate a.
Thus, a=\[−5,−2,−4,3]. The answer is −5⋅3=−15.
In the second test the array is \[42,42,42,42,42].