Making a Tetrahedron

Time limit1sMemory limit128 MB

Problem

It is well known that you cannot make a triangle with non-zero area whose sides have lengths 1, 2, and 3. Can you make a tetrahedron with non-zero volume whose six edges have lengths 1, 2, 3, 4, 5, and 6?

You may assign the six given lengths to the six edges of the tetrahedron in any arrangement. The answer is affirmative if some arrangement yields a tetrahedron with strictly positive volume.

Input

The first line contains an integer $n$, the number of lines that follow ($0 < n \le 10000$).

Each of the next $n$ lines contains six space-separated positive integers, the lengths of the edges of the desired tetrahedron. Each edge length is at most $10^6$.

Output

Output $n$ lines. For each query, print YES if it is possible to construct a tetrahedron with non-zero volume from the six given edge lengths, or NO if it is not possible.