问题4061--Tetrahedron Inequality

4061: Tetrahedron Inequality

[命题人 : ]
时间限制 : 3.000 sec  内存限制 : 128 MB

题目描述

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

输入

The first line of input contains an integer 0 < n <= 10000, the number of lines to follow. Each of the next n lines contains six positive integers separated by spaces, the lengths of the edges of the desired tetrahedron. The length of each edge is no greater than one million.

输出

Output n lines, each containing the word YES if it is possible to construct a tetrahedron with non-zero volume with the given edge lengths, or the word NO if it is not possible.

样例输入 Copy

1
1 2 3 4 5 6

样例输出 Copy

NO

来源/分类