G. Crane Boom
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

A crane boom is a line segment with one endpoint fixed at the origin. It may rotate continuously around the origin, and its length may vary continuously within $$$[l,r]$$$.

There are $$$n$$$ axis-aligned rectangular restricted zones. The boom may touch their boundaries, but no part of the segment may intersect the interior of any zone. Zones may intersect or contain one another. The origin is not in the interior of any zone.

A state is described by the position of the boom's other endpoint. Given valid initial and target states, determine whether the boom can move continuously from the initial state to the target state while remaining valid at every moment.

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$T$$$ ($$$1 \le T \le 10000$$$). Description of the test cases follows.

The first line contains three integers $$$n$$$, $$$l$$$, $$$r$$$ ($$$1 \le n \le 2 \cdot 10^5$$$, $$$0 \le l \le r \le 10^9$$$).

The second line contains four integers $$$s_x$$$, $$$s_y$$$, $$$t_x$$$, $$$t_y$$$ ($$$-10^9 \le s_x,s_y,t_x,t_y \le 10^9$$$). The initial endpoint is $$$(s_x,s_y)$$$, and the target endpoint is $$$(t_x,t_y)$$$. It is guaranteed that the boom does not intersect the interior of any restricted zone in either the initial or the target state, and its length in both states belongs to $$$[l,r]$$$.

The $$$i$$$-th of the next $$$n$$$ lines contains four integers $$$x_{1,i}$$$, $$$y_{1,i}$$$, $$$x_{2,i}$$$, $$$y_{2,i}$$$ ($$$-10^9 \le x_{1,i} \lt x_{2,i} \le 10^9$$$, $$$-10^9 \le y_{1,i} \lt y_{2,i} \le 10^9$$$), describing a zone with opposite corners $$$(x_{1,i},y_{1,i})$$$ and $$$(x_{2,i},y_{2,i})$$$. The origin is not in the interior of any zone.

The sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.

Output

For each test case, output one line containing the answer.

Print Yes if the target state is reachable, and No otherwise.

Example
Input
4
2 5 10
5 0 -5 0
-1 1 1 4
-1 -4 1 -1
2 1 10
6 0 -6 0
-2 2 2 4
-2 -4 2 -2
4 4 12
5 3 -3 -7
1 5 4 8
-6 2 -2 5
-5 -4 -2 -1
5 -6 8 -3
2 0 6
5 0 -5 0
-2 0 2 3
-2 -3 2 0
Output
No
Yes
Yes
Yes
Note

Figure: Forbidden zones and boom motion in the four sample cases

In the first test case, even at the minimum length, the upper zone blocks counterclockwise rotation from the positive horizontal axis to the negative horizontal axis, and the lower zone blocks rotation in the other direction.

In the second test case, contract the boom to length $$$2$$$, rotate below the origin toward the target, and extend to length $$$6$$$.

In the third test case, contract the boom to length $$$4$$$, rotate clockwise to the target direction, and extend to the target position. This path avoids the interior of every forbidden zone.

In the fourth test case, the two forbidden zones meet along a horizontal boundary containing the origin. The origin lies on their shared boundary, outside both forbidden interiors. The boom can contract to length $$$0$$$ and then extend toward the target, staying on the shared boundary during contraction and extension.