F. Isoball: 2D Version
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Isoball is a challenging and fun game, and in this problem, we consider its 2D version. Given the radius of a circle and its initial position, there is a rectangle on the plane, and your goal is to let the circle be in the interior of the rectangle. To do this, you determine the direction of movement for the circle (represented by a vector). Now, you want to know if there exists a moment (including the initial moment) when the circle moves in this direction to reach the goal.

For a circle with center at $$$(p,q)$$$ and radius $$$r$$$, it is considered to be inside a rectangle with bottom-left corner at $$$(l_x,l_y)$$$ and top-right corner at $$$(r_x,r_y)$$$ if and only if $$$\forall p\in\{(x,y)\mid (x-p)^2+(y-q)^2\le r^2\}$$$, it holds that $$$l_x\le p_x\le r_x$$$ and $$$l_y\le p_y\le r_y$$$, where $$$p_x,p_y$$$ are the horizontal and vertical coordinates of point $$$p$$$, respectively.

Input

The first line contains an integer $$$T$$$ ($$$1\le T\le 10^4$$$), indicating the number of test cases.

For each test case, the first line contains five integers $$$x,y,r,v_x,v_y$$$ ($$$-10^6\le x,y,v_x,v_y\le 10^6$$$, $$$1\le r\le 10^6$$$), representing the initial horizontal and vertical coordinates of the circle's center, the radius of the circle, and the direction of movement. It's guaranteed that both $$$v_x$$$ and $$$v_y$$$ are not simultaneously equal to $$$0$$$.

The second line contains four integers $$$l_x,l_y,r_x,r_y$$$ ($$$-10^6\le l_x,l_y,r_x,r_y\le 10^6$$$), representing the horizontal and vertical coordinates of the bottom-left and top-right corners of the rectangle. It's guaranteed that $$$l_x \lt r_x$$$ and $$$l_y \lt r_y$$$.

Output

For each test case, output one line. If the goal can be achieved, output Yes; otherwise, output No.

Example
Input
5
0 0 1 1 0
2 -2 6 2
0 0 1 1 0
2 0 6 2
0 0 1 1 1
1 1 3 3
0 0 1 -1 -1
1 1 3 3
0 0 1 -1 1
-5 -5 5 5
Output
Yes
No
Yes
No
Yes