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)
		distance := math.Sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya))
		if rb+distance < ra {
			fmt.Println(2)
		} else if ra+distance < rb {
			fmt.Println(-2)
		} else if rb+ra >= distance {
			fmt.Println(1)
		} else {
			fmt.Println(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: import math
for _ in range(int(input())):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    d = math.sqrt((xb - xa) ** 2 + (yb - ya) ** 2)
    if ra + rb < d:
        print(0)
    elif d + ra <= rb:
        print(-2)
    elif d + rb <= ra:
        print(2)
    else:
        print(1)

Python: import math

N = eval(input())
while N != 0:
	[Xa,Ya,Ra,Xb,Yb,Rb] = [float(element) for element in input().split()]
	distance = math.sqrt((Xa - Xb)**2 + (Ya - Yb)**2) # Compute distance from point A to point B
	if Ra - Rb > distance: # B in A
		print(2)
	elif Rb - Ra > distance: # A in B
		print(-2)
	elif Ra + Rb > distance: # Intersect
		print(1)
	else: # Not overlap
		print(0)
	N -= 1

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

Python: # -*- coding: utf-8 -*-

import sys
import os
import math


N = int(input())

for i in range(N):
    ax, ay, ar, bx, by, br = map(float, input().split())

    between_center = math.hypot(ax - bx, ay - by)

    # ????????£????????????
    if between_center > ar + br:
        print(0)

    # ????????????????????¨
    else:
        # B in A
        if ar > between_center + br:
            print(2)

        # A in B
        elif br > between_center + ar:
            print(-2)

        else:
            print(1)

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 (distance + ra < rb):
            print(-2)
        elif (distance + rb < ra):
            print(2)
        else:
            print(1)
    else:
        print(0)

Python: import math
n=int(input())
i=1
while n>=i:                                                     #終了条件
    s=list(map(float,input().split()))
    #print("s",s)
    d=math.sqrt((s[3]-s[0])*(s[3]-s[0])+(s[4]-s[1])*(s[4]-s[1]))
    #print("d",d)
    if d>s[2]+s[5]:                                             #AとBが重なっていない
        print(0)
    elif abs(s[5]-s[2])<=d<=s[2]+s[5]:                          #AとBが共有点をもつ
        print(1)
    elif d<s[2]-s[5]:                                           #BがAの中にある
        print(2)
    elif d<s[5]-s[2]:                                           #AがBの中にある
        print(-2)
    i+=1

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 ** 2 + rb ** 2
    dr = ra ** 2 - rb ** 2

    if d1 <= d2:
        if math.fabs(dr) > math.fabs(d1):
            print(2 if ra > rb else -2)
        else:
            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 ** 2 + rb ** 2
    dr = (ra-rb) ** 2

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

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 < (br - ar):
            print(2)
    if d < (ar - br):
            print(-2)
    elif d <= (ar + br):
        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(abs(xa-xb)**2 + abs(ya-yb)**2)
    if distance < ra + rb:
        if (ra < rb and distance < ra) or (ra > rb and distance < rb):
            print("2")
        else:
            print("1")
    else:
        print("0")

Python: n = int(input())
for i in range(n):
    x1, y1, r1, x2, y2, r2 = map(float, input().split())
    a = complex(x1, y1)
    b = complex(x2, y2)
    d = abs(a - b)
    if d < r1 - r2:
        print(2)
    elif d < r2 - r1:
        print(-2)
    elif d <= r1 + r2:
        print(1)
    else:
        print(0)

Python: import math

n = int(input())

for _ in range(n):
    xa,ya,ra,xb,yb,rb = map(float, input().split())
    len=math.sqrt((xa-xb)**2+(ya-yb)**2)

    if len + rb <= ra:
        print("2")
    elif len < ra + rb:
        print("1")
    else:
        print("0")

Python: import math

N = int(input())
for i in range(N):
    x1,y1,r1,x2,y2,r2 = map(float,input().split())
    d = math.sqrt(pow(x1 - x2,2.0) + pow(y1 - y2,2.0))
    if d < abs(r2 - r1):
        if r1 > r2:
            print(2)
        else:
            print(-2)
    elif d <= r1 + r2:
        print(1)
    else:
        print(0)

Python: import math

def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = int(input())
for l in range(N):

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

Python: import math
n=int(input())
for i in range(n):
    ax,ay,ar,bx,by,br=[float(i) for i in input().split()]
    ab=abs(math.sqrt(pow(ax-bx,2)+pow(ay-by,2)))
    if ar>ab and (ar-ab)>br:
        print(2)
    elif br>ab and(br-ab)>ar:
        print(-2)
    elif ab<=(ar+br):
        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,-2][d<u-r],[1,2][d<r-u]][r>u],0][r+u<d])

Python: import math

N = eval(input())
for _ in range(N):
	[Xa,Ya,Ra,Xb,Yb,Rb] = [float(element) for element in input().split()]
	distance = math.sqrt((Xa - Xb)**2 + (Ya - Yb)**2) # Compute distance from point A to point B
	if Ra - Rb - distance > 10E-8: # B in A
		print(2)
	elif Rb - Ra - distance > 10E-8: # A in B
		print(-2)
	elif Ra + Rb - distance > 10E-8: # Intersect
		print(1)
	elif Ra + Rb - distance < 10E-8: # Not overlap
		print(0)

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

Python: import math

def check_intersect(x1,y1,r1,x2,y2,r2):
    d = math.sqrt((x2-x1)**2 + (y2-y1)**2)    

    if r1 < r2 and d + r1 <= r2:
        print(-2)
    elif r1 > r2 and d + r2 <= r1:
        print(2)
    elif d > r1+r2:
        print(0)
    elif d <= r1+r2:
        print(1)
    return 0

n = int(input())
for i in range(n):
    x1,y1,r1,x2,y2,r2 = map(float,input().split())
    check_intersect(x1,y1,r1,x2,y2,r2)