Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
Statistical Charts
Submit Problem
Online Status
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Fool's Day
Time Limit: 10000MSMemory Limit: 64000K
Total Submissions: 570Accepted: 42
Case Time Limit: 2000MS


In a rectangular 2D world everything is rectangular. Rectangular people live in rectangular houses, drive rectangular cars and work in rectangular offices. The only day of a year when everything is not rectangular is April 1st --- the Fool's Day. On that day people send each other postcards with jokes and these postcards have a form of parallelograms. To support this tradition the rectangular world industry produces different parallelogram postcards and envelopes.
Mr. Rect Squarowski wants to start a new business. He would like to provide a web service that determines whether a Fool's Day postcard fits Fool's Day envelope. Help Mr. Squarowski to earn his next billion of money rects.


The first line of the input file contains integer number n (1 <= n <= 1 000) --- the number of test cases. Each test case consists of six integer numbers. The first three numbers describe an envelope, the last three --- a postcard.
Three numbers describing each parallelogram are the lengths of its adjacent sides and its diagonal re-spectively. Specified lengths will not be greater than 1 000.
It is guaranteed that the corresponding parallelogram exists and it is not degenerate.


For each test case output a single line. Print "Yes" if a postcard fits an envelope or "No" if it doesn't.

Sample Input

3 4 6 4 3 6
6 6 7 5 5 8
11 11 11 10 10 2

Sample Output



Northeastern Europe 2004, Northern Subregion

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator