distance :: [Double] -> Double
distance (x1 : y1 : x2 : y2 : _) = sqrt $ (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)

judge :: [Double] -> String
judge [xa, ya, ra, xb, yb, rb]
    | d > (ra + rb)                      = "0"
    | abs (ra - rb) <= d && d <= (ra + rb) = "1"
    | d < abs(ra - rb)                   = if ra > rb then "2" else "-2"
    where
        d = distance [xa, ya, xb, yb]

main :: IO ()
main = do
    _ <- getLine
    interact (unlines . map judge . map (map read) . map words . lines)