问题2477--Box

2477: Box

时间限制: 10 Sec  内存限制: 256 MB
提交: 21  解决: 2
[提交] [状态] [讨论版] [命题人:]

题目描述

Bella is working in a factory that produces boxes. All boxes are in a shape of rectangular parallelepipeds.A net of the corresponding parallelepiped is cut out of a flat rectangular piece of cardboard of size w×  h.
This net is a polygon with sides parallel to the sides of the rectangle of the cardboard. The net is bent along several lines and is connected along the edges of the resulting parallelepiped to form a box. The net is bent only along the edges of the resulting box.



Bella is a software developer and her task is to check whether it is possible to make a box of size a×b×c out of a cardboard of size w × h. Bella did write a program and boxes are being produced. Can you do the same?


输入

The first line contains a single number T(1 ⩽ T ⩽ 105), the number of the testcases.
For each testcase, the first line contains three integers a, b, and c — the dimensions of the box. 
The second line contains two integers w and h — the width and the height of the cardboard.
All integers are positive and do not exceed 108.

输出

For each testcase, print "Yes"if it is possible to cut a box a×b×c out of a cardboard of size w × h. Print "No"otherwise.

样例输入

3
1 2 3
6 5
1 2 3
5 5
1 1 1
10 2

样例输出

Yes
No
Yes

提示

There are 11 different nets of a cube, ignoring rotations and mirror images.




来源/分类


[提交] [状态]