main = interact $ unlines . map (show . circles_intersection . (map read) . words) . tail . lines
circles_intersection [xa,ya,ra,xb,yb,rb]
 | ra > sqrt ((xb-xa)^2+(yb-ya)^2) + rb = 2
 | rb > sqrt ((xa-xb)^2+(ya-yb)^2) + ra = -2
 | ra + rb > sqrt ((xa-xb)^2+(ya-yb)^2) = 1
 | otherwise = 0