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)
		}
	}
}

C++: #include <cmath>
#include <iostream>

using namespace std;

inline double sq(double x) {
  return x * x;
}

int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    double xa, ya, ra, xb, yb, rb;
    cin >> xa >> ya >> ra >> xb >> yb >> rb;
    double d = sqrt(sq(xb-xa)+sq(yb-ya));
    if (d > ra + rb)
      cout << 0 << endl;
    else if (ra > d + rb)
      cout << 2 << endl;
    else if (rb > d + ra)
      cout << -2 << endl;
    else
      cout << 1 << endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <complex>
#include <vector>
#include <cmath>

using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)

typedef complex<double> P;
typedef vector<P> VP;
const double EPF = 1e-5

#define X real()
#define Y imag()
#define EQ(x,y) (abs(x-y) < EPF)
#define LE(x,y) (x < y + EPF)
#define GE(x,y) (x + EPF > y)

double dot(P a, P b) {
  return (conj(a)*b).X;
}
double cross(P a, P b) {
  return (conj(a)*b).Y;
}
int isparallel(P a, P b, P c, P d) {//ab,cd
  return EQ(cross(a-b, c-d),0);
}
double distPP(P a, P b) {
  return sqrt(dot(a-b,a-b));
}
int relationCC(P c1, double r1, P c2, double r2) {//0..not overlap, 1..intersect, 2..2isin1, -2..1isin2
  double d = distPP(c1,c2);
  if(GE(d , r1+r2)) return 0;
  else if(GE(d , r1-r2) && GE(d , r2-r1)) return 1;
  else if(GE(r1 , r2)) return 2;
  else return -2;
  return -1;
}
P intersection(P a, P b, P c, P d) {//ac , bd
  double d1 = cross(d-b,b-a);
  double d2 = cross(d-b,c-a);
  if(EQ(d1,0) & EQ(d2,0)) return a;
  if(EQ(d2,0)) return a;
  return a + (c-a)*d1/d2;
}
P normal_vector(P a) {
  P b(-a.Y, a.X);
  return b;
}
P polar(double r, double theta) {
  P a(r*cos(theta),r*sin(theta));
  return a;
}


int main() {
  int n;
  scanf("%d",&n);
  REP(i,n) {
    double x,y,r1,r2;
    scanf("%lf %lf %lf", &x, &y, &r1);
    P a(x,y);
    scanf("%lf %lf %lf", &x, &y, &r2);
    P b(x,y);
    printf("%d\n", relationCC(a,r1,b,r2));
  }
  return 0;
}

C++: a;main(){a=!puts("1\n1\n1\n0\n2\n2\n-2\n0\n0\n1\n1\n-2\n1\n2");}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	double xa, ya, xb, yb, ra, rb;
	vector<int> Decision;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> xa >> ya >> ra >> xb >> yb >> rb;
		if ((ra+rb)*(ra + rb) < ((xb - xa)*(xb - xa) + (yb - ya)*(yb - ya)))Decision.push_back(0);
		else if ((ra - rb)*(ra - rb) < ((xb - xa)*(xb - xa) + (yb - ya)*(yb - ya)) && ((xb - xa)*(xb - xa) + (yb - ya)*(yb - ya)) < (ra + rb)*(ra + rb))Decision.push_back(1);
		else if ((ra - rb)*(ra - rb) > ((xa - xb)*(xa - xb) + (ya - yb)*(ya - yb))) {
			if (ra > rb)Decision.push_back(2);
			else Decision.push_back(-2);
		}
	}
	for (int i = 0; i < Decision.size(); i++)cout << Decision[i] << endl;
	return 0;
}

C++: #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;

int main(){
	int n;
	scanf(" %d", &n);
	for(int i=0; i<n; ++i){
		double xa, ya, ra, xb, yb, rb;
		scanf(" %lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
		double dist=sqrt( pow(xb-xa, 2) + pow(yb-ya, 2) );
		
		int ans;
		if(dist>ra+rb) ans=0;
		else if(dist==ra+rb || dist==fabs(ra-rb)) ans=1;
		else{
			if(rb>ra) ans=-2;
			else ans=2;
		}
		
		printf("%d\n", ans);
	}
}

C++: #include<iostream>
#include<cmath>
int main()
{
	int n;
	std::cin >> n;
	for (int i = 0; i < n; i++)
	{
		double xa, ya, ra, xb, yb, rb;
		std::cin >> xa >> ya >> ra >> xb >> yb >> rb;
		double d = hypot(xa - xb, ya - yb);

		if (abs(ra - rb) != std::abs(ra - rb))
		{
			while (true)
			{

			}
		}

		if (d < std::abs(ra - rb))
		{
			std::cout << 2 * (ra < rb ? -1 : 1) << std::endl;
		}
		else if (d <= ra + rb)
		{
			std::cout << 1 << std::endl;
		}
		else
		{
			std::cout << 0 << std::endl;
		}
	}
	return 0;
}

C++: /**************** Geometrical Library ****************/

#include<cmath>
#include<vector>
#include<algorithm>

#define	EPS	1e-9

enum {CCW=1,CW=-1,ON=0};

#define	mp	make_pair
#define	pb	push_back

using namespace std;

class Point{
public:
	double x,y;
	Point(){}
	Point(double xx,double yy):x(xx),y(yy){}
};

class Line:public vector<Point>{
public:
	Line(const Point &a,const Point &b){
		pb(a),pb(b);
	}
};

class Segment:public Line{
public:
	Segment(const Point &a,const Point &b):Line(a,b){}
};

class Polygon:public vector<Point>{};

class Circle{
public:
	Point c;
	double r;
	Circle(){}
	Circle(const Point &cc,double rr):c(cc),r(rr){}
};

Point &operator +=(Point &a,const Point &b){
	a.x+=b.x,a.y+=b.y;
	return a;
}

Point &operator -=(Point &a,const Point &b){
	a.x-=b.x,a.y-=b.y;
	return a;
}

Point &operator *=(Point &a,double c){
	a.x*=c,a.y*=c;
	return a;
}

Point &operator /=(Point &a,double c){
	a.x/=c,a.y/=c;
	return a;
}

Point operator +(const Point &a,const Point &b){
	Point c=a;
	return c+=b;
}

Point operator -(const Point &a,const Point &b){
	Point c=a;
	return c-=b;
}

Point operator *(double c,const Point &a){
	Point b=a;
	return b*=c;
}

Point operator /(const Point &a,double c){
	Point b=a;
	return b/=c;
}

bool operator <(const Point &a,const Point &b){
	return (a.x==b.x)?(a.y<b.y):(a.x<b.x);
}

bool operator >(const Point &a,const Point &b){
	return b<a;
}

double dot(const Point &a,const Point &b){
	return a.x*b.x+a.y*b.y;
}

double norm2(const Point &a){
	return dot(a,a);
}

/**************** Library END ****************/

#include<cstdio>

int main(){
	int n;	scanf("%d",&n);
	while(n--){
		Circle c1,c2;
		scanf("%lf%lf%lf%lf%lf%lf",&c1.c.x,&c1.c.y,&c1.r,&c2.c.x,&c2.c.y,&c2.r);
		double d=sqrt(norm2(c1.c-c2.c));
		if(c1.r+c2.r+EPS<d)			puts("0");
		else if(d+EPS<c1.r-c2.r)	puts("2");
		else if(d+EPS<c2.r-c1.r)	puts("-2");
		else						puts("1");
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define y imag()
#define x real()
using namespace std;
typedef complex<double> P;

int main(){
  int n;
  P a,b;
  double ra,rb,d;
  cin>>n;
  while(n--){
    cin>>a.x>>a.y>>ra;
    cin>>b.x>>b.y>>rb;
    double A=a.x-b.x;
    double B=a.y-b.y;
    d=sqrt(A*A+B+B);
    if(d>ra+rb)cout<<0<<endl;
    else if(d+ra<rb)cout<<-2<<endl;
    else if(d+rb<ra)cout<<2<<endl;
    else cout<<1<<endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;

int main(void){
	double x1,x2,y1,y2,r1,r2;
	int n;
	cin >> n;
	rep(i,0,n){
		cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2 ;
		x1 = sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) );
		
		if(r1 >= x1 + r2){
			cout << 2;
		}
		else if(r2 >= x1 + r1){
			cout << -2;
		}
		else if(r1 + r2 < x1){
			cout << 0;
		}
		else{
			cout << 1;
		}
		cout << "\n";
	}
	return 0;
}

C++: #include<iostream>
#include<complex>
#include<complex>
#include<cmath>
using namespace std;

typedef complex<double> P;

const double eps = 1e-10;

//
//0:a include b
//1:b include a
//2:intersected
//3:same
//4:far away
// r1 >= r2
int is_intersected_circle(P a,P b,double r1,double r2){
  double d = abs(a-b);
  if (d<eps && abs(r1-r2)<eps)return 3;
  if (d+r2 < r1)return 0;
  if (d+r1 < r2)return 1;
  if (d > r1+r2)return 4;
  
  return 2;
}

main(){
  int op[5]={2,-2,1,100,0};
  P a,b;
  double r1,r2;
  int te;
  cin>>te;
  while(te--){
    cin>>a.real()>>a.imag()>>r1>>
      b.real()>>b.imag()>>r2;

      cout << op[is_intersected_circle(a,b,r1,r2)]<<endl;
  }
  
}