using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Volume0_0023
{
    class Program
    {
        static void Main(string[] args)
        {
            int dataNum = int.Parse(Console.ReadLine());
            var inputs = new Queue<string>();

            for (int i = 0; i < dataNum; i++)
            {
                inputs.Enqueue(Console.ReadLine());
            }

            foreach (var input in inputs)
            {
                var dataset = input.Split(' ').Select(double.Parse).ToArray();
                Circle c1, c2;
                c1 = new Circle(new Vector2(dataset[0], dataset[1]), dataset[2]);
                c2 = new Circle(new Vector2(dataset[3], dataset[4]), dataset[5]);

                Console.WriteLine((int)Circle.GetCondition(c1, c2));
            }
        }
    }

    struct Vector2
    {
        public double X, Y;

        public Vector2(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }

        public static Vector2 Add(Vector2 v1, Vector2 v2)
        {
            return new Vector2(v1.X + v2.X, v1.Y + v2.Y);
        }


        public static Vector2 operator +(Vector2 v1, Vector2 v2)
        {
            return Add(v1, v2);
        }


        public static Vector2 Subtract(Vector2 v1, Vector2 v2)
        {
            return new Vector2(v1.X - v2.X, v1.Y - v2.Y);
        }

        public static Vector2 operator -(Vector2 v1, Vector2 v2)
        {
            return Subtract(v1, v2);
        }

        public static Vector2 Multiply(double x, Vector2 v)
        {
            return new Vector2(x * v.X, x * v.Y);
        }

        public static Vector2 operator *(double x, Vector2 v)
        {
            return Multiply(x, v);
        }

        public static Vector2 Divide(Vector2 v, double x)
        {
            return new Vector2(v.X / x, v.Y / x);
        }

        public static Vector2 operator /(Vector2 v, double x)
        {
            return Divide(v, x);
        }

        public static double Dot(Vector2 v1, Vector2 v2)
        {
            return v1.X * v2.X + v1.Y + v2.Y;
        }

        public static double Cross(Vector2 v1, Vector2 v2)
        {
            return v1.X * v2.Y - v1.Y * v2.X;
        }

        public static Vector2 Negate(Vector2 v)
        {
            return new Vector2(-v.X, -v.Y);
        }

        public static Vector2 operator -(Vector2 v)
        {
            return Negate(v);
        }

        public double Length()
        {
            return Math.Sqrt(X * X + Y * Y);
        }

        public double LengthSquared()
        {
            return X * X + Y * Y;
        }
    }

    struct Circle
    {
        public Vector2 Point;
        public double R;

        public Circle(Vector2 point, double r)
        {
            this.Point = point;
            this.R = r;
        }

        public static CircleCondition GetCondition(Circle a, Circle b)
        {
            double distance = (a.Point - b.Point).Length();

            if (distance + b.R < a.R)
            {
                return CircleCondition.BInsideA;
            }
            else if (distance + a.R < b.R)
            {
                return CircleCondition.AInsideB;
            }
            else if (distance <= a.R + b.R)
            {
                return CircleCondition.Cross;
            }
            else
            {
                return CircleCondition.Outside;
            }
        }
    }

    enum CircleCondition
    {
        BInsideA = 2,
        AInsideB = -2,
        Cross = 1,
        Outside = 0
    }
}

Measured memory_bytes: 6268