Measuring the Running Speed

No attempts yetTime limit2sMemory limit256 MB

Problem

Coach Minhyeok has the athlete Yura run ll meters to measure Yura's stamina. Yura runs from the start line to the finish line at a constant real speed of at least v1v_1 and at most v2v_2 meters per second. Minhyeok does not know the exact value of that speed.

Minhyeok left the timer at home, so the range of the speed has to be narrowed another way. At a time of Minhyeok's choosing, Minhyeok goes to one point of the course and checks whether Yura has already reached that point. The point is xx meters from the start, where 0xl0 \le x \le l. A check answers either "Yura already reached it" or "Yura has not reached it yet".

Getting to a point takes at least ss seconds. The first check cannot be made before ss seconds have passed since the start, and after a check the next one cannot be made before another ss seconds have passed. The kk-th check therefore happens no earlier than k×sk \times s seconds after the start.

Minhyeok decides the time and the point of each check after seeing the answers of the earlier checks. When the checks are over, if the interval of speeds consistent with the answers has length at most tt, Minhyeok can state Yura's speed within an error of ±t/2\pm t/2, and the measurement succeeds.

Minhyeok plans the strategy that needs the fewest checks whatever Yura's speed is. Find the number of checks in the worst case.

Input

The first line contains the number of test cases cc (1c1001 \le c \le 100).

Each of the next cc lines contains the integers ll, v1v_1, v2v_2, tt, ss of one test case, separated by spaces. (1l,v1,v2,t,s1091 \le l, v_1, v_2, t, s \le 10^9, v1<v2v_1 < v_2)

Output

Print one answer per line, one line for each test case.

If there is no way to learn Yura's speed within an error of ±t/2\pm t/2, print impossible. Otherwise print the smallest number of checks needed in the worst case. If no check is needed at all, print 0.