SMPCIRC - Two Circles

Given two circles: O1 with the center o1 = (xo1, yo1) and a radius r1 and O2 with the center o2 = (xo2, yo2) and radius r2, please compute if O1 is inside O2 or if O2 is inside O1.

Input description

First t < 1000, the number of test cases. In each of the following t lines, 6 integers: xo1 yo1 r1 xo2 yo2 r2. Where 0 ≤ xo1, yo1, xo2, yo2 ≤ 10000 and 0 < r1, r2 ≤ 10000.

Output description

For each test case print one character:
I, if O1 is inside O2 (or if O2 is inside O1),
E, if O1 is internally tangent to O2 (or if O2 is internally tangent to O1),
O, in other cases.

Example

Input:
2
103 104 5 100 100 10
103 104 10 100 100 10

Output:
E
O

Added by:kuszi
Date:2013-08-26
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.