def relation(xa, ya, ra, xb, yb, rb)
	d = ((xa - xb) ** 2 + (ya - yb) ** 2) ** 0.5
	return 0 if ra + rb < d

	return 2 if d + rb < ra
	return -2 if d + ra < rb
	return 1
end

$<.gets.to_i.times do
	p relation(*$<.gets.split.map(&:to_f))
end