Title: Circles Intersection

You are given two circles, A and B, each defined by their radius and central coordinates. Write a program to determine the relationship between these circles and print the following:
- "2" if circle B is inside circle A
- "-2" if circle A is inside circle B
- "1" if the circumferences of circles A and B intersect
- "0" if circles A and B do not overlap

Assume that circles A and B are not identical.

Input:
The input consists of multiple datasets. The first line contains an integer N (N ≤ 50), representing the number of datasets. The following N lines each represent a dataset, consisting of real numbers: xa ya ra xb yb rb

Output:
For each dataset, print 2, -2, 1, or 0 on a new line.

Sample Input:
2
0.0 0.0 5.0 0.0 0.0 4.0
0.0 0.0 2.0 4.1 0.0 2.0

Output for the Sample Input:
2
0

# Buggy version:
import sys
import math

n = int(input())

for _ in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())

    distance = math.sqrt((xa-xb)**2 + (ya-yb)**2)
    if ra + rb < distance:
        if (ra < rb and distance + ra < rb):
            print(-2)
        elif (rb < ra and distance + rb < ra):
            print(2)
        else:
            print(1)
    else:
        print(0)

# Fixed version:
import sys
import math

n = int(input())

for _ in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())

    distance = math.sqrt((xa-xb)**2 + (ya-yb)**2)
    if ra + rb >= distance:
        if (distance + ra < rb):
            print(-2)
        elif (distance + rb < ra):
            print(2)
        else:
            print(1)
    else:
        print(0)

# Buggy version:
n=int(raw_input())
for i in range(n):
    xa,ya,ra,xb,yb,rb=map(float,raw_input().split())
    d=((xa-xb)**2+(ya-yb)**2)**0.5
    if ra+rb<d:
        print 0
    elif ra>rb:
        print 2
    elif ra<rb:
        print -2
    else:
        print 1

# Fixed version:
n = int(input())
for i in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    d = ((xa - xb)**2 + (ya - yb)**2)**0.5
    if d > ra + rb:
        print(0)
    elif ra + d < rb:
        print(-2)
    elif rb + d < ra:
        print(2)
    else:
        print(1)

# Buggy version:


import math


num = int(input())

for i in range(num):
    ax,ay,ar,bx,by,br = map(float,input().split(' '))
    d = (ax - bx)*(ax - bx) + (ay * by)
    if d < abs(br - ar):
        if ar > br:
            print(2)
        else:
            print(-2)
    elif d <= r1 + r2:
        print(1)
    else:
        print(0)

# Fixed version:


import math 

num = int(input())
for i in range(num):
    ax,ay,ar,bx,by,br=map(float,input().split())
    d = ((ax-bx)* (ax - bx))+((ay-by)*(ay-by))
    r1 = (ar+br)*(ar+br)
    r2 = (ar-br)*(ar-br)
    if d <= r1 and d >= r2:
        print(1);
    elif d<r2 and ar>=br:
        print(2)
    elif d < r2 and ar <= br:
        print(-2)
    else:
        print(0)

# Buggy version:
import math
n = int(raw_input())

for i in range(n):
    xa,ya,ra,xb,yb,rb = map(float, raw_input().split())
    d = math.sqrt((xa-xb)**2+(ya-yb)**2)
    if ra+rb < d:
        print 0
    elif ra > rb:
        if d+rb < ra:
            print 2
        else:
            print 1
    elif ra < rb:
        if d+ra < rb:
            print -2
        else:
            print 1

# Fixed version:
import math

n = int(input())
for i in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    d = math.sqrt((xb - xa) ** 2 + (yb - ya) ** 2)
    if d < ra - rb:
        print(2)
    elif d < rb - ra:
        print(-2)
    elif d <= ra + rb:
        print(1)
    else:
        print(0)

# Buggy version:
import math
n = int(raw_input())

for i in range(n):
    xa, ya, ra, xb, yb, rb = map(float, raw_input().split(' '))
    d = math.sqrt((xa-xb)**2 + (ya-yb)**2)
    if d+rb <= ra:
        print 2
    elif d+ra <= rb:
        print -2
    elif d > ra+rb:
        print 0
    else:
        print 1
    

# Fixed version:
import math

n = int(input())
for i in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())

    d = math.sqrt((xa - xb)**2 + (ya - yb)**2)

    if ra > d + rb:
        print("2")
    elif rb > d + ra:
        print("-2")
    elif d > ra + rb:
        print("0")
    else:
        print("1")