object Main {
    def solve(d: Double, ra: Double, rb: Double) = {
        if (ra + rb < d) "0"
        else if (ra > d + rb) "2"
        else if (rb > d + ra) "-2"
        else "1"
    }
    def main(args: Array[String]) = {
        val in = io.Source.stdin.getLines.map(_.split(" ").map(_.toDouble)).toSeq.tail.map{p =>
            (math.sqrt(math.pow(p(0) - p(3), 2) + math.pow(p(1) - p(4), 2)), p(2), p(5))
        }
        in.foreach(p => println(solve(p._1, p._2, p._3)))
    }
}