package backjoon;
// https://www.acmicpc.net/problem/1002
// í°ë
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class _1002 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// memory 11840 runtime 96
int caseCnt = Integer.parseInt(br.readLine());
for(int i=0; i 무íë
if(x1 == x2 && y1 == y2 && r1 == r2) {
System.out.println(-1);
}
// ë ìì´ ë§ëì§ ììë
else if(distance_pow > Math.pow(r1 + r2, 2)) {
System.out.println(0);
}
// ì ìì ìì´ ìì¼ë ë´ì íì§ ìì ë
else if(distance_pow < Math.pow(r2 - r1, 2)) {
System.out.println(0);
}
// ë´ì
else if(distance_pow == Math.pow(r2 - r1, 2)) {
System.out.println(1);
}
// ì¸ì
else if(distance_pow == Math.pow(r1 + r2, 2)) {
System.out.println(1);
}
else {
System.out.println(2);
}
}
}
}
/*
input
3
0 0 13 40 0 37
0 0 3 0 7 4
1 1 1 1 1 5
output
2
1
0
*/