#include <iostream>
#include <cmath>

int main(){
	
	int data;
	
	std::cin >> data;  //dataset
	
	std::array<double, data>xa;
	std::array<double, data>ya;
	std::array<double, data>ra;
	std::array<double, data>xb;
	std::array<double, data>yb;
	std::array<double, data>rb;
	
	for(int i=0; i<data; ++i){
		std::cin >> xa[i];
		std::cin >> ya[i];
		std::cin >> ra[i];
		std::cin >> xb[i];
		std::cin >> yb[i];
		std::cin >> rb[i];
	}
	
	double length;  //a-b length;
	
	length = hypot(abs(xa-xb),abs(ya-yb));
	
	if(length > ra+rb){
		std::cout << 0 << std::endl;
	}else if(length + rb < ra){
		std::cout << 2 << std::endl; 
	}else if(length + ra < rb){
		std::cout << -2 << std::endl; 
	}else{
		std::cout << 1 << std::endl; 
	}
	
	return 0;
}