#include<iostream>
#include<iomanip>
#include<memory>
#include<array>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>

using namespace std;

int main()
{
  int n;
  double xa, ya, ra, xb, yb, rb, pp;

  cin >> n;

  for ( int i = 0; i < 2; ++i )
    {
      cin >> xa >> ya >> ra >> xb >> yb >> rb;

      pp = sqrt((xa - xb)*(xa - xb) + (ya - yb)*(ya - yb));

      if ( pp > ra + rb )
        cout << 0 << endl;
      else if ( ra > pp + rb )
        cout << 2 << endl;
      else if ( rb > pp + ra )
        cout << -2 << endl;
      else
        cout << 1 << endl;
    }
  
  return 0;
}