As known from school physics, if a physical point is given a velocity vector, then in an environment with a constant acceleration due to gravity, this physical point will fly along a parabola.
Based on this phenomenon, mobile game developers came up with a simple arcade game. In the lower left corner of the screen, there is a basketball, which initially is at the point $$$(0,0)$$$. At any moment, the user can tap the screen of the phone, and if at that moment the ball is at the point $$$(x_0, y_0)$$$, then regardless of its speed or position, it will fly along a parabola defined by the equation $$$y = - a(x-x_0)^2 + b(x-x_0) + y_0$$$.
The phone screen has a width of $$$w$$$, so if the ball at any moment is at a point of the form $$$(w, y)$$$, it will instantly teleport to the point $$$(0, y)$$$, while preserving its velocity vector. That is, after the teleportation, the trajectory of the ball will not change, and it will continue to move along the same parabola, but shifted $$$w$$$ units to the left (see the figure).
Example trajectory of the ball The basketball in the game differs from a regular one in that it does not bounce off the ground and does not roll on it. Calculate the minimum number of taps on the screen that the player needs to make in order for the ball to reach the point $$$(x_b, y_b)$$$.
Note that the player can tap the screen at any moment in time, including at the moment when the ball is at non-integer points or when $$$x=0$$$.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 30\,000$$$) — the number of test cases. The following lines describe the test cases.
Each test case is described by a single line containing the integers $$$w$$$, $$$a$$$, $$$b$$$, $$$x_b$$$, $$$y_b$$$ ($$$2 \le w \le 100$$$, $$$1 \le a, b \le 100$$$, $$$1 \le x_b \le w-1$$$, $$$1 \le y_b \le 100$$$).
For each test case, output a single integer — the minimum number of taps on the screen that the player needs to make in order for the ball to reach the point $$$(x_b, y_b)$$$.
36 1 4 1 36 1 4 1 2100 100 1 80 100
1 2 40500