Scrooge`s Tower#5889

Scrooge`s Tower

0.5 seconds
64 megabytes
Hard

Scrooge McDuck owns a circular island of radius centered at the origin. He wants to build a square tower there to keep all his wealth. The wealth is quite immense, so the tower's foundation, a square, should be inscribed in the island's circle. After reading many popular magazines, Mrs. Beakley stated that, according to feng shui, the entrance to the tower should be at the point (x_1, y_1), and the exit should be at the point (x_2, y_2). Naturally, both the entrance and exit must be located on the border of the tower's foundation.

Scrooge has told you all these values and wants to know if it is possible to satisfy Mrs. Beakley's requirements.

Input

The first line contains an integer — the number of test cases (1 \leq T \leq 1000).

Each of the next lines contains five integers: , x_1, y_1, x_2, y_2, separated by spaces, where 1 \leq R \leq 10000. Points (x_1, y_1) and (x_2, y_2) lie inside the circle.

Output

For each of the test cases, output **"YES"** if the tower can be built, and **"NO"** otherwise.

Examples

Example 1

Loading
Loading