Go: package main

import (
	"fmt"
	"math"
)

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var xa, ya, ra, xb, yb, rb float64
		fmt.Scan(&xa, &ya, &ra, &xb, &yb, &rb)
		// println(xa, ya, ra, xb, yb, rb)
		dis := math.Sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb))
		if dis + ra < rb {
			fmt.Println(-2)
		} else if dis + rb < ra {
			fmt.Println(2)
		} else if dis > rb + ra {
			fmt.Println(0)
		} else {
			fmt.Println(1)
		}
	}
}

Python: import sys

def solve(circleA, circleB):
    xa, ya, ra = circleA
    xb, yb, rb = circleB
    # ?????????????????????????????????????????´????????????
    if ra <= rb:
        if distancePow2(xa, ya, xb, yb) < pow(rb - ra, 2):
            return -2
    else:
        if distancePow2(xa, ya, xb, yb) < pow(rb - ra, 2):
            return 2

    # ??±???????????????????????????
    if pow(rb - ra, 2) <= distancePow2(xa, ya, xb, yb) <= pow(rb + ra, 2):
        return 1

    return 0

def distancePow2(xa, ya, xb, yb):
    return pow(xb - xa, 2) + pow(yb - ya, 2)

n = int(input())
for i in range(0, n):
    inStr = input()
    circleAInfo = [float(data) for data in inStr.split(" ")[0:3]]
    circleBInfo = [float(data) for data in inStr.split(" ")[3:6]]
    print(solve(circleAInfo, circleBInfo))

Python: n = int(input())
for i in range(n):
    k = input()
    xa, ya, ra, xb, yb, rb = list(map(float, k.split(" ")))
    d = abs(complex(xb-xa, yb-ya))
    if ra + rb < d:
        print("0")
    elif abs(rb-ra) <= d <= ra+rb:
        print("1")
    else:
        print("2" if ra > rb else "-2")

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

Python: n = input()
for i in range(int(n)):
    xa, ya, ra, xb, rb, yb = list(map(float, input().split(" ")))
    d = abs(complex(xb-xa, yb-ya))
    if ra + rb < d:
        print("0")
    elif abs(rb-ra) <= d <= ra+rb:
        print("1")
    elif d < abs(ra-rb):
        print("2" if ra > rb else "-2")

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

Python: import math
N = int(input())
for _ in [0]*N:
    x1, y1, r1, x2, y2, r2 = map(float, input().split())
    dist = math.sqrt((x1-x2)**2+(y1-y2)**2)
    if dist <= abs(r1-r2):
        print(2 if r1 > r2 else -2)
    elif dist <= r1+r2:
        print(1)
    else:
        print(0)

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

    d1 = (xa - xb) ** 2 + (ya - yb) ** 2
    d2 = (ra + rb) ** 2
    dr = (ra-rb) ** 2

    if d1 <= d2:
        if dr > d1:
            print(2 if ra > rb else -2)
        else:
            print(1)
    else:
        print(0)

Python: 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)

Python: for i in range(int(input())):
    xa, ya, ra, xb, yb, rb = map(float, input().split(' '))
    ab_length = ((xa - xb) ** 2 + (ya - yb) ** 2) ** 0.5
    if ra > rb:
        max_r, min_r, min_c = ra, rb, 2
    else:
        max_r, min_r, min_c = rb, ra, -2

    if ab_length > ra + rb:
        ans = 0
    elif ab_length <= ra + rb:
        if ab_length + min_r < max_r:
            ans = min_c
        else:
            ans = 1
    print(ans)

Python: import math
N = int(input())
for _ in [0]*N:
    x1, y1, r1, x2, y2, r2 = map(float, input().split())
    dist = math.sqrt((x1-x2)**2+(y1-y2)**2)
    if dist+r2 <= r1:
        print(2)
    elif dist+r1 <= r2:
        print(-2)
    elif dist <= r1+r2:
        print(1)
    else:
        print(0)

Python: def f():
    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:return 1;
    elif d<r2 and ar>=br:return 2
    elif d < r2 and ar <= br:return -2
    else:return 0

for _ in range(int(input())):print(f())

Python: 

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 < (ar - br):
            print(2)
    if d < (br - ar):
            print(-2)
    elif d <= (ar + br):
        print(1)
    else:
        print(0)

Python: def dist(P, Q):
    return ((P[0] - Q[0]) ** 2 + (P[1] - Q[1]) ** 2) ** 0.5

n = int(input())
for _ in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    A, B = (xa, ya), (xb, yb)
    if dist(A, B) > ra + rb:
        print(0)
    elif dist(A, B) + ra < rb:
        print(-2)
    elif dist(A, B) + rb < ra:
        print(2)
    else:
        print(1)

Python: n=int(input())
for i in range(n):
    points = input().split()
    p = list(map(float,points))
    if (p[3]-p[0])**2 + (p[4]-p[1])**2 < (p[2]-p[5])**2:
        if p[5]>p[2]:
            print(-2)
        else:
            print(2)
    elif (p[0]-p[3])**2 + (p[1]-p[4])**2 >= (p[2]-p[5])**2 and (p[0]-p[3])**2 + (p[1]-p[4])**2 <= (p[2]+p[5])**2:
        print(1)
    else:
        print(0)

Python: from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin
from math import hypot, copysign

for n in xrange(int(stdin.readline())):
    xa, ya, ra, xb, yb, rb = (float(s) for s in stdin.readline().split())

    distance = hypot(xa - xb, ya - yb)
    diff = ra - rb

    if ra + rb < distance:
        print('0')
    elif abs(diff) <= distance:
        print('1')
    else:
        print(int(copysign(2, diff)))

Python: import math

n = int(input())

for _ in range(n):
  x_a,y_a,r_a,x_b,y_b,r_b = map(float, input().split())
  r_ab_plus = r_a + r_b
  r_ab_minus = abs(r_a-r_b)
  dist_center = math.sqrt((x_a-x_b)**2 + (y_a-y_b)**2)
  if dist_center < r_ab_minus and r_a > r_b:
    print(2)
  elif dist_center < r_ab_minus and r_b > r_a:
    print(-2)
  elif r_ab_minus <= dist_center and dist_center <= r_ab_plus:
    print(1)
  else:
    print(0)

Python: for _ in[0]*int(input()):
 x,y,r,s,t,u=map(float,input().split())
 d=((x-s)**2+(y-t)**2)**.5
 print([[[1,0][r+u<d],-2][d<u-r],2][d<r-u])

Python: import math
count = int(input())
for i in range(count):
    x1,y1,r1,x2,y2,r2 =map(float,input().split())
    depth=(x1-x2)**2+(y1-y2)**2
    if depth> (r1+r2)**2:
        print(0)
    elif depth <(r1-r2)**2:
        if r1>r2:
            print(2)
        else:
            print(-2)
    else:
        print(1)

Python: n=int(input())
for i in range(n):
    points = input().split()
    p = list(map(float,points))
    if (p[3]-p[0])**2 + (p[4]-p[1])**2 <= (p[2]-p[5])**2:
        if p[5]>p[2]:
            print(-2)
        else:
            print(2)
    elif (p[0]-p[3])**2 + (p[1]-p[4])**2 > (p[2]-p[5])**2 and (p[0]-p[3])**2 + (p[1]-p[4])**2 <= (p[2]+p[5])**2:
        print(1)
    else:
        print(0)