CIRCINT - Intersecting Circles

Given two circles with centers at (x1, y1) and (x2, y2) and having radius r1 and r2 respectively, find if they intersect or not. Two circles are considered to be intersecting if they have a common area. Even if two circles touch at a point then they are considered to be intersecting.

Input

First line contains an integer T. Then follow T lines each line containing integers x1, y1, x2, y2, r1, r2 in that order.

Output

Print "YES" (without quotes) if they intersect and "NO" if they don't intersect.

Constraints

T <= 10,000

All other integers will have an absolute value <= 1000,000,000

Example

Input:
3
0 0 2 2 1 1
0 0 2 2 3 3
0 0 1000000000 0 600000000 400000000

Output:
NO
YES
YES

Added by:.:: Pratik ::.
Date:2011-03-07
Time limit:1.754s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2019-11-04 13:28:09 isaac
How come the second case is Yes
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.