Cody wants to shoot a missile to hit Tyger. The missile starts at $$$(0, 0)$$$, and follows a parabolic trajectory under gravity, modeled by the equation $$$y = ax^2 + bx$$$, where $$$a \lt 0$$$ and the trajectory passes through the enemy's position $$$(E_x, E_y)$$$.
Between them, there are $$$n$$$ vertical obstacles. The $$$i$$$th obstacle is at x coordinate $$$x_i$$$ and spans a closed interval $$$[y_i, z_i]$$$. In other words, the obstacle can be seen as a segment connecting $$$(x_i, y_i)$$$ and $$$(x_i, z_i)$$$.
The missile moves continuously along the curve, but it can't pass through any obstacle.
Your task is to find a set of coefficients $$$(a, b)$$$ such that the missile hits Tyger and avoids all obstacles. If multiple such trajectories exist, output the one where $$$a$$$ is maximized. It is guaranteed that a solution exists.
The first line contains an integer $$$t$$$ $$$(1 \leq t \leq 100)$$$, representing the number of test cases.
The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 10^4)$$$, the number of vertical obstacles.
The second line of each test case contains two integers $$$E_x, E_y$$$ $$$(0 \lt E_x \leq 10^5, -10^9 \leq E_y \leq 10^9)$$$, describing Tyger's position.
Each of the next $$$n$$$ lines contains integers $$$x_i$$$, $$$y_i$$$, and $$$z_i$$$ $$$(0 \lt x_i \lt E_x, -10^9 \leq y_i, z_i \leq 10^9)$$$, representing each obstacle.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$5 \cdot 10^4$$$.
For each test case, on a single line, output $$$a$$$ and $$$b$$$, the coefficients for the parabolic trajectory of the missile.
Your answer will be considered correct if its absolute or relative error does not exceed $$$10^{-6}$$$. Formally, let your answer be $$$v$$$ and the jury's answer be $$$u$$$. Your answer is accepted if and only if $$$\frac{|v - u|}{\max(1, |u|)} \leq 10^{-6}$$$.
224 02 -4 41 -1 116 03 -3 5
-1 4 -0.555556 3.333333
In the first example, the optimal trajectory is $$$y = -x^2 + 4x$$$, where the missile grazes the top of the first obstacle. It can be proven that no larger $$$a$$$ is possible.
| Name |
|---|


