Limits 1s, 256 MB

Talent Bob is a galaxy wide known legend and a racer (in game :P). He always wins races by his trick.

There is having a car race between him and his sworn enemy and you are there to watch it.

Initially both cars are in starting position 0. Whenever the distance between Bob and enemy’s car becomes 0 (both cars are side by side) Bob uses his trick and hits the enemy car and the enemy's car goes out of control and stays motionless there for T minute. And after T minute the enemy starts racing again. Bob keeps doing it until reaching the finishing line.

If both are in the finishing line together, Bob wins and no need to hit the car.

As you are waiting for the race to start, can you calculate minimum number of times Bob needs to hit the enemy car before reaching the finishing line?

Input

Number of test = N

Each test case contains 4 integers
Speed of the Bob’s car = Vs ,Speed of the enemy’s car =Ve , Finishing line distance = d, Time of the enemy's car goes out of control and stays motionless = T.

Constraints :
1<= N <=105
0<= Vs,Ve,d ,T <= 109

Output

Minimum number of times Bob needs to hit the enemy to win. If he needs to hit infinity times to win then print "inf"(without quotes). If he can't win print "Noob!" (without quotes).

Sample

InputOutput
3
1 2 3 4
1 4 5 2
1 4 15 1
1
2
12

Submit

Login to submit.

Statistics

26% Solution Ratio
EgorKulikovEarliest, Jul '20
Deshi_TouristFastest, 0.0s
EgorKulikovLightest, 786 kB
mdvirusShortest, 448B
Toph uses cookies. By continuing you agree to our Cookie Policy.