Fool's Day

No attempts yetTime limit2sMemory limit64 MB

Problem

There is a two-dimensional world where everything is rectangular. Rectangular people live in rectangular houses, drive rectangular cars, and work in rectangular offices. The only day of the year when nothing is rectangular is April 1st — Fool's Day. On that day people send each other postcards with jokes, and these postcards have the shape of parallelograms. To support this tradition, the industry of this world produces many different parallelogram postcards and envelopes.

Mr. Rect Squarowski wants to start a new business. He would like to offer a web service that decides whether a Fool's Day postcard fits into a Fool's Day envelope. Help Mr. Squarowski make his next fortune.

Each parallelogram is described by three integers: the lengths of two adjacent sides and the length of one diagonal. A postcard fits into an envelope if it can be rotated, translated, and flipped over so that it lies completely inside the envelope (touching the boundary is allowed).

Input

The first line contains an integer nn (1n10001 \le n \le 1\,000) — the number of test cases. Each test case consists of six integers. The first three describe an envelope, the last three describe a postcard.

The three integers describing each parallelogram are, in order, the lengths of its two adjacent sides and the length of one of its diagonals. All given lengths are at most 10001000.

It is guaranteed that the three numbers always form a valid, non-degenerate (non-zero area) parallelogram.

Output

For each test case, output a single line. Print Yes if the postcard fits into the envelope, or No otherwise.