#include <bits/stdc++.h>

using namespace std;

struct point {
  long long x, y, i;
  point operator+(point & o) {
    return {x + o.x, y + o.y};
  }
  point operator-(point & o) {
    return {x - o.x, y - o.y};
  }
  long long length() {
    return x * x + y * y;
  }
  bool operator<(point & o) {
    if (x * o.y - y * o.x != 0)
      return x * o.y - y * o.x > 0;
    return length() > o.length();
  }
};

int n, s[200000];
point p[200000];

int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y, p[i].i = i;
    if (p[i].x < 0 || p[i].x == 0 && p[i].y < 0)
      p[i].x *= -1, p[i].y *= -1;
  }
  sort(p, p + n);
  point r = {0, 0};
  for (int i = 0; i < n; i++) {
    point a = r + p[i];
    point b = r - p[i];
    if (a.length() <= b.length())
      r = a, s[p[i].i] = 1;
    else
      r = b, s[p[i].i] = -1;
  }
  for (int i = 0; i < n; i++)
    cout << s[i] << (i < n - 1 ? " " : "\n");
}


#include <bits/stdc++.h>

using namespace std;

struct point {
  long long x, y, i;
  point operator+(point & o) {
    return {x + o.x, y + o.y};
  }
  point operator-(point & o) {
    return {x - o.x, y - o.y};
  }
  long long length() {
    return x * x + y * y;
  }
  bool operator<(point & o) {
    if (x * o.y - y * o.x != 0)
      return x * o.y - y * o.x > 0;
    return length() > o.length();
  }
};

int n, s[200000];
point p[200000];

int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y, p[i].i = i;
    if (p[i].x < 0 || p[i].x == 0 && p[i].y < 0)
      p[i].x *= -1, p[i].y *= -1;
  }
  sort(p, p + n);
  point r = {0, 0};
  for (int j = 0; j < n; j++) {
    int i = (j % 2 == 0 ? j / 2 : n - 1 - j / 2);
    point a = r + p[i];
    point b = r - p[i];
    if (a.length() <= b.length())
      r = a, s[p[i].i] = 1;
    else
      r = b, s[p[i].i] = -1;
  }
  cerr << sqrt(r.length()) << "\n";
  for (int i = 0; i < n; i++)
    cout << s[i] << (i < n - 1 ? " " : "\n");
}


#include <bits/stdc++.h>

using namespace std;

struct point {
  long long x, y, i;
  point operator+(point & o) {
    return {x + o.x, y + o.y};
  }
  point operator-(point & o) {
    return {x - o.x, y - o.y};
  }
  long long length() {
    return x * x + y * y;
  }
  bool operator<(point & o) {
    if (x * o.y - y * o.x != 0)
      return x * o.y - y * o.x > 0;
    return length() > o.length();
  }
};

int n, s[200000];
point p[200000];

void find() {
  point r;
  do {
    r = {0, 0};
    random_shuffle(p, p + n);
    for (int j = 0; j < n; j++) {
      int i = (j % 2 == 0 ? j / 2 : n - 1 - j / 2);
      point a = r + p[i];
      point b = r - p[i];
      if (a.length() <= b.length())
        r = a, s[p[i].i] = 1;
      else
        r = b, s[p[i].i] = -1;
    }
  } while (r.length() > ((long long) 1500000) * 1500000);
  //cerr << sqrt(r.length()) << "\n";
}

int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y, p[i].i = i;
    if (p[i].x < 0 || p[i].x == 0 && p[i].y < 0)
      p[i].x *= -1, p[i].y *= -1;
  }
  find();
  for (int i = 0; i < n; i++)
    cout << s[i] << (i < n - 1 ? " " : "\n");
}


#include <bits/stdc++.h>

using namespace std;

struct point {
  long long x, y, i;
  point operator+(point & o) {
    return {x + o.x, y + o.y};
  }
  point operator-(point & o) {
    return {x - o.x, y - o.y};
  }
  long long length() {
    return x * x + y * y;
  }
  bool operator<(point & o) {
    if (x * o.y - y * o.x != 0)
      return x * o.y - y * o.x > 0;
    return length() > o.length();
  }
};

int n, s[200000];
point p[200000];

void find() {
  point r;
  do {
    r = {0, 0};
    random_shuffle(p, p + n);
    for (int i = 0; i < n; i++) {
      point a = r + p[i];
      point b = r - p[i];
      if (a.length() <= b.length())
        r = a, s[p[i].i] = 1;
      else
        r = b, s[p[i].i] = -1;
    }
  } while (r.length() > ((long long) 1500000) * 1500000);
  //cerr << sqrt(r.length()) << "\n";
}

int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y, p[i].i = i;
  }
  find();
  for (int i = 0; i < n; i++)
    cout << s[i] << (i < n - 1 ? " " : "\n");
}


#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<set>
#include<cstring>
#include<ctime>
#include<cmath>
#include<limits>
#include<iterator>
#include<functional>
#include<unordered_map>
#include<stack>
#include<bitset>

#define all(v) v.begin(), v.end()
#define setv(ar, val) memset(ar, val, sizeof(ar));
#define ll long long int
#define ull unsigned long long int
#define PI 3.1415926535897932384626433832795
#pragma comment(linker, "/STACK:536870912")
#pragma warning(disable : 4996)
using namespace std;

const int N = 1e6 + 100;

struct P {
	ll x, y, i;
};
P p[N], w[N];
int ans[N];

P operator + (P a, P b) {
	return { a.x + b.x, a.y + b.y };
}

P operator * (P a, ll k) {
	return { a.x * k, a.y * k };
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n;
	scanf("%d", &n);

	if (n == 1) {
		printf("1");
		return 0;
	}

	for (int i = 0; i < n; i++) {
		scanf("%lld%lld", &p[i].x, &p[i].y);
		p[i].i = i;
		w[i] = p[i];
	}

	int h = n, z = 1;
	while (h > 2) {
		P a[3] = { p[h - 1], p[h - 2], p[h - 3] };
		int t[2], g[2];

		ll val = 1e18;
		P r;

		for (int i = 0; i < 3; i++) {
			for (int j = i + 1; j < 3; j++) {
				for (int x = -1; x < 2; x += 2) {
					for (int y = -1; y < 2; y += 2) {
						P s = a[i] * x + a[j] * y;
						ll d = s.x * s.x + s.y * s.y;
						if (d < val) {
							r = s;
							val = d;
							t[0] = a[i].i;
							t[1] = a[j].i;
							g[0] = x;
							g[1] = y;
						}
					}
				}
			}
		}

		r.i = N - z;
		z++;
		h -= 3;
		for (int i = 0; i < 3; i++) {
			if (a[i].i != t[0] && a[i].i != t[1])
				p[h++] = a[i];
		}
		p[h++] = r;

		ans[t[0]] = g[0];
		ans[t[1]] = g[1];
	}

	ll val = 1e18;
	for (int x = -1; x < 2; x += 2) {
		P s = p[0] + p[1] * x;
		ll d = s.x * s.x + s.y * s.y;
		if (d < val) {
			val = d;
			ans[p[0].i] = 1;
			ans[p[1].i] = x;
		}
	}

	for (int i = 0; i < n; i++) {
		printf("%d ", ans[i]);
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<set>
#include<cstring>
#include<ctime>
#include<cmath>
#include<limits>
#include<iterator>
#include<functional>
#include<unordered_map>
#include<stack>
#include<bitset>

#define all(v) v.begin(), v.end()
#define setv(ar, val) memset(ar, val, sizeof(ar));
#define ll long long int
#define ull unsigned long long int
#define PI 3.1415926535897932384626433832795
#pragma comment(linker, "/STACK:536870912")
#pragma warning(disable : 4996)
using namespace std;

const int N = 1e5 + 100;

struct P {
	ll x, y, i;
};
P p[N], w[N];
int ans[N];

P operator + (P a, P b) {
	return { a.x + b.x, a.y + b.y };
}

P operator * (P a, ll k) {
	return { a.x * k, a.y * k };
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n;
	scanf("%d", &n);

	if (n == 1) {
		printf("1");
		return 0;
	}

	for (int i = 0; i < n; i++) {
		scanf("%lld%lld", &p[i].x, &p[i].y);
		p[i].i = i;
		w[i] = p[i];
	}

	int h = n;
	while (h > 2) {
		P a[3] = { p[h - 1], p[h - 2], p[h - 3] };
		int t[2], g[2];

		ll val = 1e18;
		for (int i = 0; i < 3; i++) {
			for (int j = i + 1; j < 3; j++) {
				for (int x = -1; x < 2; x += 2) {
					for (int y = -1; y < 2; y += 2) {
						P s = a[i] * x + a[j] * y;
						ll d = s.x * s.x + s.y * s.y;
						if (d < val) {
							val = d;
							t[0] = a[i].i;
							t[1] = a[j].i;
							g[0] = x;
							g[1] = y;
						}
					}
				}
			}
		}

		h -= 3;
		for (int i = 0; i < 3; i++) {
			if (a[i].i != t[0] && a[i].i != t[1])
				p[h++] = a[i];
		}
		ans[t[0]] = g[0];
		ans[t[1]] = g[1];
	}

	ll val = 1e18;
	for (int x = -1; x < 2; x += 2) {
		for (int y = -1; y < 2; y += 2) {
			P s = p[0] * x + p[1] * y;
			ll d = s.x * s.x + s.y * s.y;
			if (d < val) {
				val = d;
				ans[p[0].i] = x;
				ans[p[1].i] = y;
			}
		}
	}

	for (int i = 0; i < n; i++) {
		printf("%d ", ans[i]);
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<set>
#include<cstring>
#include<ctime>
#include<cmath>
#include<limits>
#include<iterator>
#include<functional>
#include<unordered_map>
#include<stack>
#include<bitset>

#define all(v) v.begin(), v.end()
#define setv(ar, val) memset(ar, val, sizeof(ar));
#define ll long long int
#define ull unsigned long long int
#define PI 3.1415926535897932384626433832795
#pragma comment(linker, "/STACK:536870912")
#pragma warning(disable : 4996)
using namespace std;

const int N = 1e5 + 100;

struct P {
	ll x, y, i;
};
P p[N], w[N];
int ans[N];

P operator + (P a, P b) {
	return { a.x + b.x, a.y + b.y };
}

P operator * (P a, ll k) {
	return { a.x * k, a.y * k };
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n;
	scanf("%d", &n);

	if (n == 1) {
		printf("1");
		return 0;
	}

	for (int i = 0; i < n; i++) {
		scanf("%lld%lld", &p[i].x, &p[i].y);
		p[i].i = i;
		w[i] = p[i];
	}

	int h = n;
	while (h > 2) {
		P a[3] = { p[h - 1], p[h - 2], p[h - 3] };
		int t[2], g[2];

		ll val = 1e18;
		P r;

		for (int i = 0; i < 3; i++) {
			for (int j = i + 1; j < 3; j++) {
				for (int x = -1; x < 2; x += 2) {
					for (int y = -1; y < 2; y += 2) {
						P s = a[i] * x + a[j] * y;
						ll d = s.x * s.x + s.y * s.y;
						if (d < val) {
							r = s;
							val = d;
							t[0] = a[i].i;
							t[1] = a[j].i;
							g[0] = x;
							g[1] = y;
						}
					}
				}
			}
		}
		r.i = N - 1;
		h -= 3;
		for (int i = 0; i < 3; i++) {
			if (a[i].i != t[0] && a[i].i != t[1])
				p[h++] = a[i];
		}
		p[h++] = r;

		ans[t[0]] = g[0];
		ans[t[1]] = g[1];
	}

	ll val = 1e18;
	for (int x = -1; x < 2; x += 2) {
		P s = p[0] + p[1] * x;
		ll d = s.x * s.x + s.y * s.y;
		if (d < val) {
			val = d;
			ans[p[0].i] = 1;
			ans[p[1].i] = x;
		}
	}

	for (int i = 0; i < n; i++) {
		printf("%d ", ans[i]);
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<set>
#include<cstring>
#include<ctime>
#include<cmath>
#include<limits>
#include<iterator>
#include<functional>
#include<unordered_map>
#include<stack>
#include<bitset>

#define all(v) v.begin(), v.end()
#define setv(ar, val) memset(ar, val, sizeof(ar));
#define ll long long int
#define ull unsigned long long int
#define PI 3.1415926535897932384626433832795
#pragma comment(linker, "/STACK:536870912")
#pragma warning(disable : 4996)
using namespace std;

const int N = 1e5 + 100;

struct P {
	ll x, y, i;
};
P p[N], w[N];
int ans[N];

P operator + (P a, P b) {
	return { a.x + b.x, a.y + b.y };
}

P operator * (P a, ll k) {
	return { a.x * k, a.y * k };
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n;
	scanf("%d", &n);

	if (n == 1) {
		printf("1");
		return 0;
	}

	for (int i = 0; i < n; i++) {
		scanf("%lld%lld", &p[i].x, &p[i].y);
		p[i].i = i;
		w[i] = p[i];
	}

	int h = n;
	while (h > 2) {
		P a[3] = { p[h - 1], p[h - 2], p[h - 3] };
		int t[2], g[2];

		ll val = 1e18;
		P r;
		r.i = N - 1;
		for (int i = 0; i < 3; i++) {
			for (int j = i + 1; j < 3; j++) {
				for (int x = -1; x < 2; x += 2) {
					for (int y = -1; y < 2; y += 2) {
						P s = a[i] * x + a[j] * y;
						ll d = s.x * s.x + s.y * s.y;
						if (d < val) {
							r = s;
							val = d;
							t[0] = a[i].i;
							t[1] = a[j].i;
							g[0] = x;
							g[1] = y;
						}
					}
				}
			}
		}

		h -= 3;
		for (int i = 0; i < 3; i++) {
			if (a[i].i != t[0] && a[i].i != t[1])
				p[h++] = a[i];
		}
		p[h++] = r;

		ans[t[0]] = g[0];
		ans[t[1]] = g[1];
	}

	ll val = 1e18;
	for (int x = -1; x < 2; x += 2) {
		P s = p[0] + p[1] * x;
		ll d = s.x * s.x + s.y * s.y;
		if (d < val) {
			val = d;
			ans[p[0].i] = 1;
			ans[p[1].i] = x;
		}
	}

	for (int i = 0; i < n; i++) {
		printf("%d ", ans[i]);
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<set>
#include<cstring>
#include<ctime>
#include<cmath>
#include<limits>
#include<iterator>
#include<functional>
#include<unordered_map>
#include<stack>
#include<bitset>

#define all(v) v.begin(), v.end()
#define setv(ar, val) memset(ar, val, sizeof(ar));
#define ll long long int
#define ull unsigned long long int
#define PI 3.1415926535897932384626433832795
#pragma comment(linker, "/STACK:536870912")
#pragma warning(disable : 4996)
using namespace std;

const int N = 1e6 + 100;

struct P {
	ll x, y, i;
};
P p[N], w[N];
int ans[N], q[N][2];

P operator + (P a, P b) {
	return { a.x + b.x, a.y + b.y };
}

P operator * (P a, ll k) {
	return { a.x * k, a.y * k };
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n;
	scanf("%d", &n);

	if (n == 1) {
		printf("1");
		return 0;
	}

	for (int i = 0; i < n; i++) {
		scanf("%lld%lld", &p[i].x, &p[i].y);
		p[i].i = i;
		w[i] = p[i];
	}

	setv(q, -1);

	int h = n, z = n;
	while (h > 2) {
		P a[3] = { p[h - 1], p[h - 2], p[h - 3] };
		int t[2], g[2];

		ll val = 1e18;
		P r;

		for (int i = 0; i < 3; i++) {
			for (int j = i + 1; j < 3; j++) {
				for (int x = -1; x < 2; x += 2) {
					for (int y = -1; y < 2; y += 2) {
						P s = a[i] * x + a[j] * y;
						ll d = s.x * s.x + s.y * s.y;
						if (d < val) {
							r = s;
							val = d;
							t[0] = a[i].i;
							t[1] = a[j].i;
							g[0] = x;
							g[1] = y;
						}
					}
				}
			}
		}

		q[z][0] = t[0];
		q[z][1] = t[1];
		r.i = z++;
		h -= 3;
		for (int i = 0; i < 3; i++) {
			if (a[i].i != t[0] && a[i].i != t[1])
				p[h++] = a[i];
		}
		p[h++] = r;

		ans[t[0]] = g[0];
		ans[t[1]] = g[1];
	}

	ll val = 1e18;
	for (int x = -1; x < 2; x += 2) {
		P s = p[0] + p[1] * x;
		ll d = s.x * s.x + s.y * s.y;
		if (d < val) {
			val = d;
			ans[p[0].i] = 1;
			ans[p[1].i] = x;
		}
	}

	for (int i = z - 1; i >= 0; i--) {
		for (int j = 0; j < 2; j++) {
			if (q[i][j] != -1) {
				ans[q[i][j]] *= ans[i];
			}
		}
	}

	for (int i = 0; i < n; i++) {
		printf("%d ", ans[i]);
	}

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

const double yo=1.5*1e6;

int main()
{
    int n;scanf("%d",&n);
    long long  sx=0,sy=0;
    for(int i=1;i<=n;++i){
        bool f=true;
        long long x,y;
        scanf("%lld%lld",&x,&y);
        long long tx1=sx+x,ty1=sy+y,tx2=sx-x,ty2=sy-y;
        double ts1=tx1*tx1+ty1*ty1,ts2=tx2*tx2+ty2*ty2;
        ts1=sqrt(ts1);
        ts2=sqrt(ts2);
        if(ts1<ts2){
            f=true;
            sx=tx1,sy=ty1;
        }
        else {
            f=false;
            sx=tx2,sy=ty2;
        }
        printf("%d%c",f?1:-1,i==n?'\n':' ');

    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

const double yo=1.5*1e6;

int main()
{
    int n;scanf("%d",&n);
    long long  sx=0,sy=0;
    for(int i=1;i<=n;++i){
        bool f=true;
        long long x,y;
        scanf("%lld%lld",&x,&y);
        long long tx1=sx+x,ty1=sy+y,tx2=sx-x,ty2=sy-y;
        double ts1=tx1*tx1+ty1*ty1,ts2=tx2*tx2+ty2*ty2;
        ts1=sqrt(ts1);
        ts2=sqrt(ts2);
        if(ts1<ts2){
            f=true;
            sx=tx1,sy=ty1;
        }
        else if(ts1>ts2){
            f=false;
            sx=tx2,sy=ty2;
        }
        else{
            if(sx>=0&&sy>=0){
                f=false;
                sx=tx2,sy=ty2;
            }
            else {
                f=true;
                sx=tx1,sy=ty1;
            }
        }
        printf("%d%c",f?1:-1,i==n?'\n':' ');

    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

const double yo=1.5*1e6;

int main()
{
    int n;scanf("%d",&n);
    long long  sx=0,sy=0;
    for(int i=1;i<=n;++i){
        bool f=true;
        long long x,y;
        scanf("%lld%lld",&x,&y);
        long long tx1=sx+x,ty1=sy+y,tx2=sx-x,ty2=sy-y;
        double ts1=tx1*tx1+ty1*ty1,ts2=tx2*tx2+ty2*ty2;
        ts1=sqrt(ts1);
        ts2=sqrt(ts2);
        if(ts1<=ts2){
            f=true;
            sx=tx1,sy=ty1;
        }
        else {
            f=false;
            sx=tx2,sy=ty2;
        }
        printf("%d%c",f?1:-1,i==n?'\n':' ');

    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

const double yo=1.5*1e6;

struct node{long long x,y,id;}s[100005];

int main()
{
    int n;scanf("%d",&n);
    for(int i=1;i<=n;++i){
        scanf("%lld%lld",&s[i].x,&s[i].y);
        s[i].id=i;
    }
    int ans[100005]={0};
    while(1){
        random_shuffle(s+1,s+1+n);
        long long  sx=0,sy=0;
        for(int i=1;i<=n;++i){
            bool f=true;
            long long x=s[i].x,y=s[i].y;
            long long tx1=sx+x,ty1=sy+y,tx2=sx-x,ty2=sy-y;
            double ts1=tx1*tx1+ty1*ty1,ts2=tx2*tx2+ty2*ty2;
            ts1=sqrt(ts1);
            ts2=sqrt(ts2);
            if(ts1<ts2){
                f=true;
                sx=tx1,sy=ty1;
            }
            else if(ts1>ts2){
                f=false;
                sx=tx2,sy=ty2;
            }
            else{
                if(sx>=0&&sy>=0){
                    f=false;
                    sx=tx2,sy=ty2;
                }
                else {
                    f=true;
                    sx=tx1,sy=ty1;
                }
            }
            ans[s[i].id]=f?1:-1;
        }
        if(sx*sx+sy*sy<=yo*yo){
            for(int i=1;i<=n;++i){
                printf("%d%c",ans[i],i==n?'\n':' ');
            }
            break;
        }

    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

const double yo=1.5*1e6;

int main()
{
    int n;scanf("%d",&n);
    long long  sx=0,sy=0;
    for(int i=1;i<=n;++i){
        bool f=true;
        long long x,y;
        scanf("%lld%lld",&x,&y);
        long long tx=sx+x,ty=sy+y;
        double ts=tx*tx+ty*ty;
        ts=sqrt(ts);
        if(ts>yo){
            f=false;
            tx=sx-x;
            ty=sy-y;
        }
        sx=tx,sy=ty;
        printf("%d%c",f?1:-1,i==n?'\n':' ');

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

typedef tuple<int,int,int> iii;
typedef vector<iii> viii;

const int MX = 100005;
int n;
ll x[MX], y[MX], q[MX], res[MX];

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> x[i] >> y[i];

	iota(q, q+n, 0);
	sort(q, q+n, [&] (int i, int j) {
		return x[i] * x[i] + y[i] * y[i] < x[j] * x[j] + y[j] * y[j];
	});

	for (int i = 0; i < n; i++) {
		if (x[i])
			x[i] /= abs(x[i]);
		if (y[i])
			y[i] /= abs(y[i]);
	}

	int a = 1, b = 1;
	for (int i = 0; i < n; i++) {
		int u = q[i];

		if (!x[u] && !y[u]) {
			res[u] = 1;
		} else if (!x[u]) {
			if (y[u] == 1)
				res[u] = a*b;
			else
				res[u] = -a*b;
			a *= -1, b *= -1;
		} else if (!y[u]) {
			if (x[u] == 1)
				res[u] = a*b;
			else
				res[u] = -a*b;
			a *= -1, b *= -1;
		} else if (x[u] == y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else {
			if (y[u] == 1)
				res[u] = b;
			else
				res[u] = -b;
			b *= -1;
		}
	}

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

const int MX = 100005;

struct Punto {
	ll x, y;

	Punto operator - (Punto ot) {
		return {x - ot.x, y - ot.y};
	}

	Punto operator * (int s) {
		return {x * s, y * s};
	}

	void leer () {
		cin >> x >> y;
	}

	ll abs () {
		return x * x + y * y;
	}

	void impr () {
		cout << x << " " << y << endl;
	}
};

struct Tree {
	Tree *izq, *der;
	Punto p;
	int ind, s;

	Tree () : ind(-1) {}
	Tree (Tree *_izq, Tree *_der, Punto _p, int _ind, int _s) :
		izq(_izq), der(_der), p(_p), ind(_ind), s(_s) {}
};

ll dist (Tree *a, int sa, Tree *b, int sb) {
	return (a->p * sa - b->p * sb).abs();
}

int n, res[MX];
int p1[12] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
int p2[12] = {1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2};
int p3[12] = {2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0 ,0};
int s1[12] = {1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1};
int s2[12] = {1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1};
Punto p[MX];

queue<Tree*> q;
Tree *obtTree () {
	for (int i = 0; i < n; i++)
		q.push(new Tree(0, 0, p[i], i, 1));

	while (q.size() > 2) {
		Tree *t[3];
		t[0] = q.front(); q.pop();
		t[1] = q.front(); q.pop();
		t[2] = q.front(); q.pop();

		Tree *res[3];
		res[0] = t[0], res[1] = t[1], res[2] = t[2];
		int sg[3] = {1};
		ll mn = 1e18;

		for (int l = 0; l < 12; l++) {
			ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);

			if (d < mn) {
				mn = d;
				res[0] = t[p1[l]];
				res[1] = t[p2[l]];
				res[2] = t[p3[l]];
				sg[0] = s1[l];
				sg[1] = s2[l];
			}
		}

		res[0]->s = sg[0];
		res[1]->s = -sg[1];

		q.push(res[2]);
		q.push(new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1));
	}

	Tree *t[2];
	t[0] = q.front(); q.pop();
	t[1] = q.front(); q.pop();

	Tree *res[3];
	res[0] = t[0], res[1] = t[1];
	int sg[2] = {1};
	ll mn = 1e18;

	for (int l = 0; l < 4; l++) {
		ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);
		if (d < mn) {
			mn = d;
			res[0] = t[p1[l]];
			res[1] = t[p2[l]];
			sg[0] = s1[l];
			sg[1] = s2[l];
		}
	}

	res[0]->s = sg[0];
	res[1]->s = -sg[1];

	return new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1);
}

void obtRes (Tree *t, int s) {
    if (t->ind != -1) {
		res[t->ind] = s * t->s;
		return;
	}

	obtRes(t->izq, s * t->s);
	obtRes(t->der, s * t->s);
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		p[i].leer();

	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}

	//cout << sqrt(obtTree()->p.abs()) << endl;
	obtRes(obtTree(), 1);

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

const int MX = 100005;

struct Punto {
	ll x, y;

	Punto operator - (Punto ot) {
		return {x - ot.x, y - ot.y};
	}

	Punto operator * (int s) {
		return {x * s, y * s};
	}

	void leer () {
		cin >> x >> y;
	}

	ll abs () {
		return x * x + y * y;
	}

	void impr () {
		cout << x << " " << y << endl;
	}
};

struct Tree {
	Tree *izq, *der;
	Punto p;
	int ind, s;

	Tree () : ind(-1) {}
	Tree (Tree *izq, Tree *der, Punto p, int ind, int s) :
		izq(izq), der(der), p(p), ind(ind), s(s) {}
};

ll dist (Tree *a, int sa, Tree *b, int sb) {
	return (a->p * sa - b->p * sb).abs();
}

int n, s[MX], res[MX];
int p1[] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
int p2[] = {1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2};
int p3[] = {2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0 ,0};
int s1[] = {1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1};
int s2[] = {1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1};
Punto p[MX];

queue<Tree*> q;
Tree *obtTree () {
	for (int i = 0; i < n; i++)
		q.push(new Tree(0, 0, p[i], i, 1));

	while (q.size() > 2) {
		Tree *t[3];
		t[0] = q.front(); q.pop();
		t[1] = q.front(); q.pop();
		t[2] = q.front(); q.pop();

		Tree *res[3];
		res[0] = t[0], res[1] = t[1], res[2] = t[2];
		int sg[3] = {1};
		ll mn = 1e18;

		for (int l = 0; l < 12; l++) {
			ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);

			if (d < mn) {
				mn = d;
				res[0] = t[p1[l]];
				res[1] = t[p2[l]];
				res[2] = t[p3[l]];
				sg[0] = s1[l];
				sg[1] = s2[l];
			}
		}

		res[0]->s = sg[0];
		res[1]->s = -sg[1];

		q.push(res[2]);
		q.push(new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1));
	}

	Tree *t[2];
	t[0] = q.front(); q.pop();
	t[1] = q.front(); q.pop();

	Tree *res[3];
	res[0] = t[0], res[1] = t[1];
	int sg[2] = {1};
	ll mn = 1e18;

	for (int l = 0; l < 8; l++) {
		ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);
		if (d < mn) {
			mn = d;
			res[0] = t[p1[l]];
			res[1] = t[p2[l]];
			sg[0] = s1[l];
			sg[1] = s2[l];
		}
	}

	res[0]->s = sg[0];
	res[1]->s = sg[1];

	return new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1);
}

void obtRes (Tree *t, int s) {
	if (t->ind != -1) {
		res[t->ind] = s * t->s;
		return;
	}

	obtRes(t->izq, s * t->s);
	obtRes(t->der, s * t->s);
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		p[i].leer();

	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}

	//cout << sqrt(obtTree()->p.abs()) << endl;
	obtRes(obtTree(), 1);

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

const int MX = 100005;

struct Punto {
	ll x, y;

	Punto operator - (Punto ot) {
		return {x - ot.x, y - ot.y};
	}

	Punto operator * (int s) {
		return {x * s, y * s};
	}

	void leer () {
		cin >> x >> y;
	}

	ll abs () {
		return x * x + y * y;
	}

	void impr () {
		cout << x << " " << y << endl;
	}
};

struct Tree {
	Tree *izq, *der;
	Punto p;
	int ind, s;

	Tree () : ind(-1) {}
	Tree (Tree *_izq, Tree *_der, Punto _p, int _ind, int _s) :
		izq(_izq), der(_der), p(_p), ind(_ind), s(_s) {}
};

ll dist (Tree *a, int sa, Tree *b, int sb) {
	return (a->p * sa - b->p * sb).abs();
}

int n, res[MX];
int p1[12] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
int p2[12] = {1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2};
int p3[12] = {2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0 ,0};
int s1[12] = {1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1};
int s2[12] = {1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1};
Punto p[MX];

queue<Tree*> q;
Tree *obtTree () {
	for (int i = 0; i < n; i++)
		q.push(new Tree(0, 0, p[i], i, 1));

	while (q.size() > 2) {
		Tree *t[3];
		t[0] = q.front(); q.pop();
		t[1] = q.front(); q.pop();
		t[2] = q.front(); q.pop();

		Tree *res[3];
		res[0] = t[0], res[1] = t[1], res[2] = t[2];
		int sg[3] = {1};
		ll mn = 1e18;

		for (int l = 0; l < 12; l++) {
			ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);

			if (d < mn) {
				mn = d;
				res[0] = t[p1[l]];
				res[1] = t[p2[l]];
				res[2] = t[p3[l]];
				sg[0] = s1[l];
				sg[1] = s2[l];
			}
		}

		res[0]->s = sg[0];
		res[1]->s = -sg[1];

		q.push(res[2]);
		q.push(new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1));
	}

	Tree *t[2];
	t[0] = q.front(); q.pop();
	t[1] = q.front(); q.pop();

	Tree *res[3];
	res[0] = t[0], res[1] = t[1];
	int sg[2] = {1};
	ll mn = 1e18;

	for (int l = 0; l < 4; l++) {
		ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);
		if (d < mn) {
			mn = d;
			res[0] = t[p1[l]];
			res[1] = t[p2[l]];
			sg[0] = s1[l];
			sg[1] = s2[l];
		}
	}

	res[0]->s = sg[0];
	res[1]->s = sg[1];

	return new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1);
}

void obtRes (Tree *t, int s) {
    t->p.impr();
    cout << t->ind << " " << t->s << endl;

	if (t->ind != -1) {
		res[t->ind] = s * t->s;
		return;
	}

	obtRes(t->izq, s * t->s);
	obtRes(t->der, s * t->s);
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		p[i].leer();

	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}

	//cout << sqrt(obtTree()->p.abs()) << endl;
	obtRes(obtTree(), 1);

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

typedef tuple<int,int,int> iii;
typedef vector<iii> viii;

const int MX = 100005;
int n;
ll x[MX], y[MX], q[MX], res[MX];

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> x[i] >> y[i];

	iota(q, q+n, 0);
	sort(q, q+n, [&] (int i, int j) {
		return x[i] * x[i] + y[i] * y[i] < x[j] * x[j] + y[j] * y[j];
	});

	for (int i = 0; i < n; i++) {
		if (x[i])
			x[i] /= abs(x[i]);
		if (y[i])
			y[i] /= abs(y[i]);
	}

	int a = 1, b = 1;
	for (int i = 0; i < n; i++) {
		int u = q[i];

		if (!x[u] && !y[u]) {
			res[u] = 1;
		} else if (!x[u]) {
			if (y[u] == 1)
				res[u] = b;
			else
				res[u] = -b;
			b *= -1;
		} else if (!y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else if (x[u] == y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else {
			if (y[u] == 1)
				res[u] = b;
			else
				res[u] = -b;
			b *= -1;
		}
	}

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

typedef tuple<int,int,int> iii;
typedef vector<iii> viii;

const int MX = 100005;
int n;
ll x[MX], y[MX], q[MX], res[MX];

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> x[i] >> y[i];

	iota(q, q+n, 0);
	sort(q, q+n, [&] (int i, int j) {
		return x[i] * x[i] + y[i] * y[i] < x[j] * x[j] + y[j] * y[j];
	});

	for (int i = 0; i < n; i++) {
		if (x[i])
			x[i] /= abs(x[i]);
		if (y[i])
			y[i] /= abs(y[i]);
	}

	int a = 1, b = 1;
	for (int i = 0; i < n; i++) {
		int u = q[i];

		if (!x[u] && !y[u]) {
			res[u] = 1;
		} else if (!x[u]) {
			if (y[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else if (!y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else if (x[u] == y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else {
			if (y[u] == 1)
				res[u] = b;
			else
				res[u] = -b;
			b *= -1;
		}
	}

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

const int MX = 100005;

struct Punto {
	ll x, y;

	Punto operator - (Punto ot) {
		return {x - ot.x, y - ot.y};
	}

	Punto operator * (int s) {
		return {x * s, y * s};
	}

	void leer () {
		cin >> x >> y;
	}

	ll abs () {
		return x * x + y * y;
	}

	void impr () {
		cout << x << " " << y << endl;
	}
};

struct Tree {
	Tree *izq, *der;
	Punto p;
	int ind, s;

	Tree () : ind(-1) {}
	Tree (Tree *_izq, Tree *_der, Punto _p, int _ind, int _s) :
		izq(_izq), der(_der), p(_p), ind(_ind), s(_s) {}
};

ll dist (Tree *a, int sa, Tree *b, int sb) {
	return (a->p * sa - b->p * sb).abs();
}

int n, res[MX];
int p1[12] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
int p2[12] = {1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2};
int p3[12] = {2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0 ,0};
int s1[12] = {1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1};
int s2[12] = {1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1};
Punto p[MX];

queue<Tree*> q;
Tree *obtTree () {
	for (int i = 0; i < n; i++)
		q.push(new Tree(0, 0, p[i], i, 1));

	while (q.size() > 2) {
		Tree *t[3];
		t[0] = q.front(); q.pop();
		t[1] = q.front(); q.pop();
		t[2] = q.front(); q.pop();

		Tree *res[3];
		res[0] = t[0], res[1] = t[1], res[2] = t[2];
		int sg[3] = {1};
		ll mn = 1e18;

		for (int l = 0; l < 12; l++) {
			ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);

			if (d < mn) {
				mn = d;
				res[0] = t[p1[l]];
				res[1] = t[p2[l]];
				res[2] = t[p3[l]];
				sg[0] = s1[l];
				sg[1] = s2[l];
			}
		}

		res[0]->s = sg[0];
		res[1]->s = -sg[1];

		q.push(res[2]);
		q.push(new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1));
	}

	Tree *t[2];
	t[0] = q.front(); q.pop();
	t[1] = q.front(); q.pop();

	Tree *res[3];
	res[0] = t[0], res[1] = t[1];
	int sg[2] = {1};
	ll mn = 1e18;

	for (int l = 0; l < 4; l++) {
		ll d = dist(t[p1[l]], s1[l], t[p2[l]], s2[l]);
		if (d < mn) {
			mn = d;
			res[0] = t[p1[l]];
			res[1] = t[p2[l]];
			sg[0] = s1[l];
			sg[1] = s2[l];
		}
	}

	res[0]->s = sg[0];
	res[1]->s = sg[1];

	return new Tree(res[0], res[1], res[0]->p * sg[0] - res[1]->p * sg[1], -1, 1);
}

void obtRes (Tree *t, int s) {
    if (t->ind != -1) {
		res[t->ind] = s * t->s;
		return;
	}

	obtRes(t->izq, s * t->s);
	obtRes(t->der, s * t->s);
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		p[i].leer();

	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}

	//cout << sqrt(obtTree()->p.abs()) << endl;
	obtRes(obtTree(), 1);

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define FOR(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

typedef tuple<int,int,int> iii;
typedef vector<iii> viii;

const int MX = 100005;
int n;
ll x[MX], y[MX], q[MX], res[MX];

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> x[i] >> y[i];

	iota(q, q+n, 0);
	sort(q, q+n, [&] (int i, int j) {
		return x[i] * x[i] + y[i] * y[i] < x[j] * x[j] + y[j] * y[j];
	});

	for (int i = 0; i < n; i++) {
		if (x[i])
			x[i] /= abs(x[i]);
		if (y[i])
			y[i] /= abs(y[i]);
	}

	int a = 1, b = -1;
	for (int i = 0; i < n; i++) {
		int u = q[i];

		if (!x[u] && !y[u]) {
			res[u] = 1;
		} else if (!x[u]) {
			if (y[u] == 1)
				res[u] = b;
			else
				res[u] = -b;
			b *= -1;
		} else if (!y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else if (x[u] == y[u]) {
			if (x[u] == 1)
				res[u] = a;
			else
				res[u] = -a;
			a *= -1;
		} else {
			if (y[u] == 1)
				res[u] = b;
			else
				res[u] = -b;
			b *= -1;
		}
	}

	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	cout << endl;

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long ll1;
const ll MAX=1e6+5;
ll MOD=1e9+7;
ll MOD1=1e9+7;
#define pb push_back
#define se second
#define fi first
#define sb __builtin_popcount
#define maxe max_element
#define mine min_element
#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<endl;
#define debug4(x,y,z,w) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<endl;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fbo find_by_order
#define ook order_of_key
#define ub upper_bound
#define lb lower_bound
#define pq priority_queue
#define pll pair<ll,ll>
using namespace __gnu_pbds;
#define ordereds tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
#define error 0.000000000000000001
ll add(ll a,ll b){if((ll1)a+b>=MOD)return (ll1)a+b-MOD;return a+b;}
ll mul(ll a,ll b){return ((ll1)a*b)%MOD;}
ll sub(ll a,ll b){if(a>=b)return a-b;return a-b+MOD;}
ll add1(ll a,ll b){return ((ll1)a+b)%MOD1;}
ll mul1(ll a,ll b){return ((ll1)a*b)%MOD1;}
#define boost               ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define dt pair<pll,ll>
template <class F>
struct Point {
  F x, y;
  Point() : x(0), y(0) {}
  Point(const F& x, const F& y) : x(x), y(y) {}

  void swap(Point& other) { using std::swap; swap(x, other.x); swap(y, other.y); }
  template <class F1> explicit operator Point<F1> () const {
    return Point<F1>(static_cast<F1>(x), static_cast<F1>(y)); }
  template <class F1> Point& operator = (const Point<F1>& other) {
    x = other.x; y = other.y; return *this; }
  template <class F1> Point& operator += (const Point<F1>& other) {
    x += other.x; y += other.y; return *this; }
  template <class F1> Point& operator -= (const Point<F1>& other) {
    x -= other.x; y -= other.y; return *this; }
  template <class F1> Point& operator *= (const F1& factor) {
    x *= factor; y *= factor; return *this; }
  template <class F1> Point& operator /= (const F1& factor) {
    x /= factor; y /= factor; return *this; }
};

template <class F> int read(Point<F>& point) { return read(point.x, point.y) / 2; }
template <class F> int write(const Point<F>& point) { return write(point.x, point.y); }

template <class F> istream& operator >> (istream& is, Point<F>& point) {
  return is >> point.x >> point.y; }
template <class F> ostream& operator << (ostream& os, const Point<F>& point) {
  return os << point.x << ' ' << point.y; }

template <class F> inline Point<F> makePoint(const F& x, const F& y) { return Point<F>(x, y); }
template <class F> void swap(Point<F>& lhs, Point<F>& rhs) { lhs.swap(rhs); }

#define FUNC1(name, arg, expr) \
template <class F> inline auto name(const arg) -> decltype(expr) { return expr; }
#define FUNC2(name, arg1, arg2, expr) \
template <class F1, class F2> \
inline auto name(const arg1, const arg2) -> decltype(expr) { return expr; }
#define FUNC3(name, arg1, arg2, arg3, expr) \
template <class F1, class F2, class F3> \
inline auto name(const arg1, const arg2, const arg3) -> decltype(expr) { return expr; }

FUNC1(operator -, Point<F>& point, makePoint(-point.x, -point.y))
FUNC2(operator +, Point<F1>& lhs, Point<F2>& rhs, makePoint(lhs.x + rhs.x, lhs.y + rhs.y))
FUNC2(operator -, Point<F1>& lhs, Point<F2>& rhs, makePoint(lhs.x - rhs.x, lhs.y - rhs.y))
FUNC2(operator *, F1& factor, Point<F2>& rhs, makePoint(factor * rhs.x, factor * rhs.y))
FUNC2(operator *, Point<F1>& lhs, F2& factor, makePoint(lhs.x * factor, lhs.y * factor))
FUNC2(operator /, Point<F1>& lhs, F2& factor, makePoint(lhs.x / factor, lhs.y / factor))

FUNC2(operator *, Point<F1>& lhs, Point<F2>& rhs, lhs.x * rhs.x + lhs.y * rhs.y)
FUNC2(operator ^, Point<F1>& lhs, Point<F2>& rhs, lhs.x * rhs.y - lhs.y * rhs.x)

// < 0 if rhs <- lhs counter-clockwise, 0 if collinear, > 0 if clockwise.
FUNC2(ccw, Point<F1>& lhs, Point<F2>& rhs, rhs ^ lhs)
FUNC3(ccw, Point<F1>& lhs, Point<F2>& rhs, Point<F3>& origin, ccw(lhs - origin, rhs - origin))

FUNC2(operator ==, Point<F1>& lhs, Point<F2>& rhs, lhs.x == rhs.x && lhs.y == rhs.y)
FUNC2(operator !=, Point<F1>& lhs, Point<F2>& rhs, !(lhs == rhs))

FUNC2(operator <, Point<F1>& lhs, Point<F2>& rhs,
    lhs.y < rhs.y || (lhs.y == rhs.y && lhs.x < rhs.x))
FUNC2(operator >, Point<F1>& lhs, Point<F2>& rhs, rhs < lhs)
FUNC2(operator <=, Point<F1>& lhs, Point<F2>& rhs, !(lhs > rhs))
FUNC2(operator >=, Point<F1>& lhs, Point<F2>& rhs, !(lhs < rhs))

// Angles and rotations (counter-clockwise).
FUNC1(angle, Point<F>& point, atan2(point.y, point.x))
FUNC2(angle, Point<F1>& lhs, Point<F2>& rhs, atan2(lhs ^ rhs, lhs * rhs))
FUNC3(angle, Point<F1>& lhs, Point<F2>& rhs, Point<F3>& origin,
      angle(lhs - origin, rhs - origin))
FUNC3(rotate, Point<F1>& point, F2& angleSin, F3& angleCos,
      makePoint(angleCos * point.x - angleSin * point.y,
                angleSin * point.x + angleCos * point.y))
FUNC2(rotate, Point<F1>& point, F2& angle, rotate(point, sin(angle), cos(angle)))
FUNC3(rotate, Point<F1>& point, F2& angle, Point<F3>& origin,
      origin + rotate(point - origin, angle))
FUNC1(perp, Point<F>& point, makePoint(-point.y, point.x))

// Distances.
FUNC1(abs, Point<F>& point, point * point)
FUNC1(norm, Point<F>& point, sqrt(abs(point)))
FUNC2(dist, Point<F1>& lhs, Point<F2>& rhs, norm(lhs - rhs))
FUNC2(dist2, Point<F1>& lhs, Point<F2>& rhs, abs(lhs - rhs))
FUNC2(bisector, Point<F1>& lhs, Point<F2>& rhs, lhs * norm(rhs) + rhs * norm(lhs))

#undef FUNC1
#undef FUNC2
#undef FUNC3
template <class F>
struct Line {
  Point<F> a, ab;
  Line() : a(), ab() {}
  Line(const Point<F>& a, const Point<F>& b, bool twoPoints = true)
    : a(a), ab(twoPoints ? b - a : b) {}
  Line(const F& xa, const F& ya, const F& xb, const F& yb)
    : a(xa, ya), ab(xb - xa, yb - ya) {}

  void swap(Line& other) { using std::swap; swap(a, other.a); swap(ab, other.ab); }
  template <class F1> explicit operator Line<F1> () const {
    return Line<F1>(Point<F1>(a), Point<F1>(ab), false); }
  template <class F1> Line& operator = (const Line<F1>& other) {
    a = other.a; ab = other.ab; return *this; }

  Point<F> b() const { return a + ab; }
  operator bool () const { return ab != Point<F>(); }
};

template <class F> int read(Line<F>& line) {
  int res = read(line.a, line.ab) / 2;
  return line.ab -= line.a, res;
}

template <class F>
inline Line<F> makeLine(const Point<F>& a, const Point<F>& b, bool twoPoints = true) {
  return Line<F>(a, b, twoPoints);
}

template <class F> void swap(Line<F>& lhs, Line<F>& rhs) { lhs.swap(rhs); }
template <class F1, class F2>
bool onLine(const Point<F1>& point, const Line<F2>& line) {
  if (!line) return point == line.a;
  return ((point - line.a) ^ line.ab) == 0;
}
template <class F1, class F2>
bool onSegment(const Point<F1>& point, const Line<F2>& seg) {
  if (!seg) return point == seg.a;
  auto vecta = seg.a - point, vectb = seg.b() - point;
  return (vecta ^ vectb) == 0 && (vecta * vectb) <= 0;
}
template <class F1, class F2> using distF = decltype(sqrt(F1() + F2()));

template <class F1, class F2>
distF<F1, F2> distLine(const Point<F1>& point, const Line<F2>& line) {
  if (!line) return dist(point, line.a);
  return abs((point - line.a) ^ line.ab) / norm(line.ab);
}
template <class F1, class F2>
distF<F1, F2> distSegment(const Point<F1>& point, const Line<F2>& seg) {
  if (((point - seg.a) * seg.ab) <= 0) return dist(point, seg.a);
  if (((point - seg.b()) * seg.ab) >= 0) return dist(point, seg.b());
  return distLine(point, seg);
}
template <class F1, class F2, class F3>
void projection(const Point<F1>& point, const Line<F2>& line, Point<F3>& res) {
  res = line.a;
  if (line) res += line.ab * static_cast<F3>((point - line.a) * line.ab) / abs(line.ab);
}

template <class F1, class F2, class F3>
void reflection(const Point<F1>& point, const Line<F2>& line, Point<F3>& res) {
  projection(point, line, res);
  res = 2 * res - point;
}
template <class F1, class F2, class F3>
void closest(const Point<F1>& point, const Line<F2>& seg, Point<F3>& res) {
  if (((point - seg.a) * seg.ab) <= 0) res = seg.a;
  else if (((point - seg.b()) * seg.ab) >= 0) res = seg.b();
  else projection(point, seg, res);
}
template <int TYPE> struct EndpointChecker {};
template <> struct EndpointChecker<0> {  // no endpoint (ray)
  template <class F> bool operator ()(const F& a, const F& b) const { return true; }};
template <> struct EndpointChecker<1> {  // closed endpoint
  template <class F> bool operator ()(const F& a, const F& b) const { return a <= b; }};
template <> struct EndpointChecker<2> {  // open endpoint
  template <class F> bool operator ()(const F& a, const F& b) const { return a < b; }};

template <int LA, int LB, int RA, int RB, class F1, class F2, class F3>
bool intersectLines(const Line<F1>& lhs, const Line<F2>& rhs, Point<F3>& res) {
  assert(lhs && rhs);
  auto s = lhs.ab ^ rhs.ab;
  if (s == 0) return false;
  auto ls = (rhs.a - lhs.a) ^ rhs.ab;
  auto rs = (rhs.a - lhs.a) ^ lhs.ab;
  if (s < 0) s = -s, ls = -ls, rs = -rs;
  bool intersect =
    EndpointChecker<LA>()(decltype(ls)(0), ls) && EndpointChecker<LB>()(ls, s) &&
    EndpointChecker<RA>()(decltype(rs)(0), rs) && EndpointChecker<RB>()(rs, s);
  if (intersect) res = lhs.a + lhs.ab * static_cast<F3>(ls) / s;
  return intersect;
}

template <class F1, class F2, class F3>
bool intersectClosedSegments(const Line<F1>& lhs, const Line<F2>& rhs, Point<F3>& res) {
  return intersectLines<1, 1, 1, 1>(lhs, rhs, res);
}
template <class F1, class F2, class F3>
bool intersectSegments(const Line<F1>& lhs, const Line<F2>& rhs, Line<F3>& res) {
  auto s = lhs.ab ^ rhs.ab;
  auto ls = (rhs.a - lhs.a) ^ rhs.ab;
  if (s == 0) {
    if (ls != 0) return false;
    auto lhsa = lhs.a, lhsb = lhs.b();
    auto rhsa = rhs.a, rhsb = rhs.b();
    if (lhsa > lhsb) swap(lhsa, lhsb);
    if (rhsa > rhsb) swap(rhsa, rhsb);
    res = Line<F3>(max(lhsa, rhsa), min(lhsb, rhsb));
    return res.ab >= Point<F3>();
  }
  auto rs = (rhs.a - lhs.a) ^ lhs.ab;
  if (s < 0) s = -s, ls = -ls, rs = -rs;
  bool intersect = 0 <= ls && ls <= s && 0 <= rs && rs <= s;
  if (intersect)
    res = Line<F3>(lhs.a + lhs.ab * static_cast<F3>(ls) / s, Point<F3>());
  return intersect;
}
template <class F>
struct AngleCompare {
  const Point<F> origin;
  const bool zero;

  AngleCompare(const Point<F>& origin = Point<F>())
    : origin(origin), zero(origin == Point<F>()) {}

  template <class F1, class F2>
  bool operator () (const Point<F1>& lhs, const Point<F2>& rhs) const {
    return zero ? ccw(lhs, rhs) < 0 : ccw(lhs, rhs, origin) < 0;
  }
};

template <class Iterator, class F>
void sortByAngle(Iterator first, Iterator last, const Point<F>& origin) {
  first = partition(first, last, [&origin](const decltype(*first)& point) {
    return point == origin; });
  auto pivot = partition(first, last, [&origin](const decltype(*first)& point) {
    return point > origin; });
  AngleCompare<F> acmp(origin);
  sort(first, pivot, acmp);
  sort(pivot, last, acmp);
}
short sgn[MAX];
ll n;
Point<ll>v[MAX];
pll  fun(ll i,Point<ll> a,Point<ll> b)
{
  //debug4(a.x,a.y,b.x,b.y);
  if(i==n+1){
    if(abs(a-b)<abs(a+b))return {1,-1};
    return {1,1};
  }
  ll m=max(abs(v[i]),abs(a));
  m=max(m,abs(b));
  short sgna=1,sgnb=1;
  if(abs(v[i]-a)<=m){
    pll retsgn=fun(i+1,v[i]-a,b);
    sgn[i]=retsgn.fi;
    sgna=-retsgn.fi;
    sgnb=retsgn.se;
  }
  else if(abs(v[i]+a)<=m){
    pll retsgn=fun(i+1,v[i]+a,b);
    sgn[i]=retsgn.fi;
    sgna=retsgn.fi;
    sgnb=retsgn.se;
  }
  else if(abs(v[i]+b)<=m){
    pll retsgn=fun(i+1,v[i]+b,a);
    sgn[i]=retsgn.fi;
    sgna=retsgn.se;
    sgnb=retsgn.fi;
  }
  else if(abs(v[i]-b)<=m){
    pll retsgn=fun(i+1,v[i]-b,a);
    sgn[i]=retsgn.fi;
    sgna=retsgn.se;
    sgnb=-retsgn.fi;
  }
  else if(abs(a-b)<=m){
    pll retsgn=fun(i+1,a-b,v[i]);
    sgn[i]=retsgn.se;
    sgna=retsgn.fi;
    sgnb=-retsgn.fi;
  }
  else if(abs(a+b)<=m){
    pll retsgn=fun(i+1,a+b,v[i]);
    sgn[i]=retsgn.se;
    sgna=retsgn.fi;
    sgnb=retsgn.fi;
  }
  else {
    cout<<i;
    return {0,0};
  }
  return {sgna,sgnb};
}
int main()
{
    boost;
    cout<<fixed<<setprecision(12);
    #ifndef ONLINE_JUDGE
      freopen("input.txt","r",stdin);
      freopen("output01.txt","w",stdout);
    #endif
  cin>>n;
  for(int i=1;i<=n;i++){
    cin>>v[i];
    sgn[i]=1;
  }
  if(n==1){
    cout<<1;
    return 0;
  }
  pll retsgn=fun(3,v[1],v[2]);
  sgn[1]=retsgn.fi;
  sgn[2]=retsgn.se;
  for(int i=1;i<=n;i++)cout<<sgn[i]<<' ';
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long ll1;
const ll MAX=1e6+5;
ll MOD=1e9+7;
ll MOD1=1e9+7;
#define pb push_back
#define se second
#define fi first
#define sb __builtin_popcount
#define maxe max_element
#define mine min_element
#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<endl;
#define debug4(x,y,z,w) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<endl;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fbo find_by_order
#define ook order_of_key
#define ub upper_bound
#define lb lower_bound
#define pq priority_queue
#define pll pair<ll,ll>
using namespace __gnu_pbds;
#define ordereds tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
#define error 0.000000000000000001
ll add(ll a,ll b){if((ll1)a+b>=MOD)return (ll1)a+b-MOD;return a+b;}
ll mul(ll a,ll b){return ((ll1)a*b)%MOD;}
ll sub(ll a,ll b){if(a>=b)return a-b;return a-b+MOD;}
ll add1(ll a,ll b){return ((ll1)a+b)%MOD1;}
ll mul1(ll a,ll b){return ((ll1)a*b)%MOD1;}
#define boost               ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define dt pair<pll,ll>
template <class F>
struct Point {
  F x, y;
  Point() : x(0), y(0) {}
  Point(const F& x, const F& y) : x(x), y(y) {}

  void swap(Point& other) { using std::swap; swap(x, other.x); swap(y, other.y); }
  template <class F1> explicit operator Point<F1> () const {
    return Point<F1>(static_cast<F1>(x), static_cast<F1>(y)); }
  template <class F1> Point& operator = (const Point<F1>& other) {
    x = other.x; y = other.y; return *this; }
  template <class F1> Point& operator += (const Point<F1>& other) {
    x += other.x; y += other.y; return *this; }
  template <class F1> Point& operator -= (const Point<F1>& other) {
    x -= other.x; y -= other.y; return *this; }
  template <class F1> Point& operator *= (const F1& factor) {
    x *= factor; y *= factor; return *this; }
  template <class F1> Point& operator /= (const F1& factor) {
    x /= factor; y /= factor; return *this; }
};

template <class F> int read(Point<F>& point) { return read(point.x, point.y) / 2; }
template <class F> int write(const Point<F>& point) { return write(point.x, point.y); }

template <class F> istream& operator >> (istream& is, Point<F>& point) {
  return is >> point.x >> point.y; }
template <class F> ostream& operator << (ostream& os, const Point<F>& point) {
  return os << point.x << ' ' << point.y; }

template <class F> inline Point<F> makePoint(const F& x, const F& y) { return Point<F>(x, y); }
template <class F> void swap(Point<F>& lhs, Point<F>& rhs) { lhs.swap(rhs); }

#define FUNC1(name, arg, expr) \
template <class F> inline auto name(const arg) -> decltype(expr) { return expr; }
#define FUNC2(name, arg1, arg2, expr) \
template <class F1, class F2> \
inline auto name(const arg1, const arg2) -> decltype(expr) { return expr; }
#define FUNC3(name, arg1, arg2, arg3, expr) \
template <class F1, class F2, class F3> \
inline auto name(const arg1, const arg2, const arg3) -> decltype(expr) { return expr; }

FUNC1(operator -, Point<F>& point, makePoint(-point.x, -point.y))
FUNC2(operator +, Point<F1>& lhs, Point<F2>& rhs, makePoint(lhs.x + rhs.x, lhs.y + rhs.y))
FUNC2(operator -, Point<F1>& lhs, Point<F2>& rhs, makePoint(lhs.x - rhs.x, lhs.y - rhs.y))
FUNC2(operator *, F1& factor, Point<F2>& rhs, makePoint(factor * rhs.x, factor * rhs.y))
FUNC2(operator *, Point<F1>& lhs, F2& factor, makePoint(lhs.x * factor, lhs.y * factor))
FUNC2(operator /, Point<F1>& lhs, F2& factor, makePoint(lhs.x / factor, lhs.y / factor))

FUNC2(operator *, Point<F1>& lhs, Point<F2>& rhs, lhs.x * rhs.x + lhs.y * rhs.y)
FUNC2(operator ^, Point<F1>& lhs, Point<F2>& rhs, lhs.x * rhs.y - lhs.y * rhs.x)

// < 0 if rhs <- lhs counter-clockwise, 0 if collinear, > 0 if clockwise.
FUNC2(ccw, Point<F1>& lhs, Point<F2>& rhs, rhs ^ lhs)
FUNC3(ccw, Point<F1>& lhs, Point<F2>& rhs, Point<F3>& origin, ccw(lhs - origin, rhs - origin))

FUNC2(operator ==, Point<F1>& lhs, Point<F2>& rhs, lhs.x == rhs.x && lhs.y == rhs.y)
FUNC2(operator !=, Point<F1>& lhs, Point<F2>& rhs, !(lhs == rhs))

FUNC2(operator <, Point<F1>& lhs, Point<F2>& rhs,
    lhs.y < rhs.y || (lhs.y == rhs.y && lhs.x < rhs.x))
FUNC2(operator >, Point<F1>& lhs, Point<F2>& rhs, rhs < lhs)
FUNC2(operator <=, Point<F1>& lhs, Point<F2>& rhs, !(lhs > rhs))
FUNC2(operator >=, Point<F1>& lhs, Point<F2>& rhs, !(lhs < rhs))

// Angles and rotations (counter-clockwise).
FUNC1(angle, Point<F>& point, atan2(point.y, point.x))
FUNC2(angle, Point<F1>& lhs, Point<F2>& rhs, atan2(lhs ^ rhs, lhs * rhs))
FUNC3(angle, Point<F1>& lhs, Point<F2>& rhs, Point<F3>& origin,
      angle(lhs - origin, rhs - origin))
FUNC3(rotate, Point<F1>& point, F2& angleSin, F3& angleCos,
      makePoint(angleCos * point.x - angleSin * point.y,
                angleSin * point.x + angleCos * point.y))
FUNC2(rotate, Point<F1>& point, F2& angle, rotate(point, sin(angle), cos(angle)))
FUNC3(rotate, Point<F1>& point, F2& angle, Point<F3>& origin,
      origin + rotate(point - origin, angle))
FUNC1(perp, Point<F>& point, makePoint(-point.y, point.x))

// Distances.
FUNC1(abs, Point<F>& point, point * point)
FUNC1(norm, Point<F>& point, sqrt(abs(point)))
FUNC2(dist, Point<F1>& lhs, Point<F2>& rhs, norm(lhs - rhs))
FUNC2(dist2, Point<F1>& lhs, Point<F2>& rhs, abs(lhs - rhs))
FUNC2(bisector, Point<F1>& lhs, Point<F2>& rhs, lhs * norm(rhs) + rhs * norm(lhs))

#undef FUNC1
#undef FUNC2
#undef FUNC3
template <class F>
struct Line {
  Point<F> a, ab;
  Line() : a(), ab() {}
  Line(const Point<F>& a, const Point<F>& b, bool twoPoints = true)
    : a(a), ab(twoPoints ? b - a : b) {}
  Line(const F& xa, const F& ya, const F& xb, const F& yb)
    : a(xa, ya), ab(xb - xa, yb - ya) {}

  void swap(Line& other) { using std::swap; swap(a, other.a); swap(ab, other.ab); }
  template <class F1> explicit operator Line<F1> () const {
    return Line<F1>(Point<F1>(a), Point<F1>(ab), false); }
  template <class F1> Line& operator = (const Line<F1>& other) {
    a = other.a; ab = other.ab; return *this; }

  Point<F> b() const { return a + ab; }
  operator bool () const { return ab != Point<F>(); }
};

template <class F> int read(Line<F>& line) {
  int res = read(line.a, line.ab) / 2;
  return line.ab -= line.a, res;
}

template <class F>
inline Line<F> makeLine(const Point<F>& a, const Point<F>& b, bool twoPoints = true) {
  return Line<F>(a, b, twoPoints);
}

template <class F> void swap(Line<F>& lhs, Line<F>& rhs) { lhs.swap(rhs); }
template <class F1, class F2>
bool onLine(const Point<F1>& point, const Line<F2>& line) {
  if (!line) return point == line.a;
  return ((point - line.a) ^ line.ab) == 0;
}
template <class F1, class F2>
bool onSegment(const Point<F1>& point, const Line<F2>& seg) {
  if (!seg) return point == seg.a;
  auto vecta = seg.a - point, vectb = seg.b() - point;
  return (vecta ^ vectb) == 0 && (vecta * vectb) <= 0;
}
template <class F1, class F2> using distF = decltype(sqrt(F1() + F2()));

template <class F1, class F2>
distF<F1, F2> distLine(const Point<F1>& point, const Line<F2>& line) {
  if (!line) return dist(point, line.a);
  return abs((point - line.a) ^ line.ab) / norm(line.ab);
}
template <class F1, class F2>
distF<F1, F2> distSegment(const Point<F1>& point, const Line<F2>& seg) {
  if (((point - seg.a) * seg.ab) <= 0) return dist(point, seg.a);
  if (((point - seg.b()) * seg.ab) >= 0) return dist(point, seg.b());
  return distLine(point, seg);
}
template <class F1, class F2, class F3>
void projection(const Point<F1>& point, const Line<F2>& line, Point<F3>& res) {
  res = line.a;
  if (line) res += line.ab * static_cast<F3>((point - line.a) * line.ab) / abs(line.ab);
}

template <class F1, class F2, class F3>
void reflection(const Point<F1>& point, const Line<F2>& line, Point<F3>& res) {
  projection(point, line, res);
  res = 2 * res - point;
}
template <class F1, class F2, class F3>
void closest(const Point<F1>& point, const Line<F2>& seg, Point<F3>& res) {
  if (((point - seg.a) * seg.ab) <= 0) res = seg.a;
  else if (((point - seg.b()) * seg.ab) >= 0) res = seg.b();
  else projection(point, seg, res);
}
template <int TYPE> struct EndpointChecker {};
template <> struct EndpointChecker<0> {  // no endpoint (ray)
  template <class F> bool operator ()(const F& a, const F& b) const { return true; }};
template <> struct EndpointChecker<1> {  // closed endpoint
  template <class F> bool operator ()(const F& a, const F& b) const { return a <= b; }};
template <> struct EndpointChecker<2> {  // open endpoint
  template <class F> bool operator ()(const F& a, const F& b) const { return a < b; }};

template <int LA, int LB, int RA, int RB, class F1, class F2, class F3>
bool intersectLines(const Line<F1>& lhs, const Line<F2>& rhs, Point<F3>& res) {
  assert(lhs && rhs);
  auto s = lhs.ab ^ rhs.ab;
  if (s == 0) return false;
  auto ls = (rhs.a - lhs.a) ^ rhs.ab;
  auto rs = (rhs.a - lhs.a) ^ lhs.ab;
  if (s < 0) s = -s, ls = -ls, rs = -rs;
  bool intersect =
    EndpointChecker<LA>()(decltype(ls)(0), ls) && EndpointChecker<LB>()(ls, s) &&
    EndpointChecker<RA>()(decltype(rs)(0), rs) && EndpointChecker<RB>()(rs, s);
  if (intersect) res = lhs.a + lhs.ab * static_cast<F3>(ls) / s;
  return intersect;
}

template <class F1, class F2, class F3>
bool intersectClosedSegments(const Line<F1>& lhs, const Line<F2>& rhs, Point<F3>& res) {
  return intersectLines<1, 1, 1, 1>(lhs, rhs, res);
}
template <class F1, class F2, class F3>
bool intersectSegments(const Line<F1>& lhs, const Line<F2>& rhs, Line<F3>& res) {
  auto s = lhs.ab ^ rhs.ab;
  auto ls = (rhs.a - lhs.a) ^ rhs.ab;
  if (s == 0) {
    if (ls != 0) return false;
    auto lhsa = lhs.a, lhsb = lhs.b();
    auto rhsa = rhs.a, rhsb = rhs.b();
    if (lhsa > lhsb) swap(lhsa, lhsb);
    if (rhsa > rhsb) swap(rhsa, rhsb);
    res = Line<F3>(max(lhsa, rhsa), min(lhsb, rhsb));
    return res.ab >= Point<F3>();
  }
  auto rs = (rhs.a - lhs.a) ^ lhs.ab;
  if (s < 0) s = -s, ls = -ls, rs = -rs;
  bool intersect = 0 <= ls && ls <= s && 0 <= rs && rs <= s;
  if (intersect)
    res = Line<F3>(lhs.a + lhs.ab * static_cast<F3>(ls) / s, Point<F3>());
  return intersect;
}
template <class F>
struct AngleCompare {
  const Point<F> origin;
  const bool zero;

  AngleCompare(const Point<F>& origin = Point<F>())
    : origin(origin), zero(origin == Point<F>()) {}

  template <class F1, class F2>
  bool operator () (const Point<F1>& lhs, const Point<F2>& rhs) const {
    return zero ? ccw(lhs, rhs) < 0 : ccw(lhs, rhs, origin) < 0;
  }
};

template <class Iterator, class F>
void sortByAngle(Iterator first, Iterator last, const Point<F>& origin) {
  first = partition(first, last, [&origin](const decltype(*first)& point) {
    return point == origin; });
  auto pivot = partition(first, last, [&origin](const decltype(*first)& point) {
    return point > origin; });
  AngleCompare<F> acmp(origin);
  sort(first, pivot, acmp);
  sort(pivot, last, acmp);
}
short sgn[MAX];
ll n;
Point<ll>v[MAX];
pll  fun(ll i,Point<ll> a,Point<ll> b)
{
  //debug4(a.x,a.y,b.x,b.y);
  if(i==n+1)return {1,1};
  ll m=max(abs(v[i]),abs(a));
  m=max(m,abs(b));
  short sgna=1,sgnb=1;
  if(abs(v[i]-a)<=m){
    pll retsgn=fun(i+1,v[i]-a,b);
    sgn[i]=retsgn.fi;
    sgna=-retsgn.fi;
    sgnb=retsgn.se;
  }
  else if(abs(v[i]+a)<=m){
    pll retsgn=fun(i+1,v[i]+a,b);
    sgn[i]=retsgn.fi;
    sgna=retsgn.fi;
    sgnb=retsgn.se;
  }
  else if(abs(v[i]+b)<=m){
    pll retsgn=fun(i+1,v[i]+b,a);
    sgn[i]=retsgn.fi;
    sgna=retsgn.se;
    sgnb=retsgn.fi;
  }
  else if(abs(v[i]-b)<=m){
    pll retsgn=fun(i+1,v[i]-b,a);
    sgn[i]=retsgn.fi;
    sgna=retsgn.se;
    sgnb=-retsgn.fi;
  }
  else if(abs(a-b)<=m){
    pll retsgn=fun(i+1,a-b,v[i]);
    sgn[i]=retsgn.se;
    sgna=retsgn.fi;
    sgnb=-retsgn.fi;
  }
  else if(abs(a+b)<=m){
    pll retsgn=fun(i+1,a+b,v[i]);
    sgn[i]=retsgn.se;
    sgna=retsgn.fi;
    sgnb=retsgn.fi;
  }
  else {
    cout<<i;
    return {0,0};
  }
  return {sgna,sgnb};
}
int main()
{
    boost;
    cout<<fixed<<setprecision(12);
    #ifndef ONLINE_JUDGE
      freopen("input.txt","r",stdin);
      freopen("output01.txt","w",stdout);
    #endif
  cin>>n;
  for(int i=1;i<=n;i++){
    cin>>v[i];
    sgn[i]=1;
  }
  if(n==1){
    cout<<1;
    return 0;
  }
  pll retsgn=fun(3,v[1],v[2]);
  sgn[1]=retsgn.fi;
  sgn[2]=retsgn.se;
  for(int i=1;i<=n;i++)cout<<sgn[i]<<' ';
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long ll1;
const ll MAX=1e6+5;
ll MOD=1e9+7;
ll MOD1=1e9+7;
#define pb push_back
#define se second
#define fi first
#define sb __builtin_popcount
#define maxe max_element
#define mine min_element
#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<endl;
#define debug4(x,y,z,w) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<endl;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fbo find_by_order
#define ook order_of_key
#define ub upper_bound
#define lb lower_bound
#define pq priority_queue
#define pll pair<ll,ll>
using namespace __gnu_pbds;
#define ordereds tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
#define error 0.000000000000000001
ll add(ll a,ll b){if((ll1)a+b>=MOD)return (ll1)a+b-MOD;return a+b;}
ll mul(ll a,ll b){return ((ll1)a*b)%MOD;}
ll sub(ll a,ll b){if(a>=b)return a-b;return a-b+MOD;}
ll add1(ll a,ll b){return ((ll1)a+b)%MOD1;}
ll mul1(ll a,ll b){return ((ll1)a*b)%MOD1;}
#define boost               ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define dt pair<pll,ll>
template <class F>
struct Point {
  F x, y;
  Point() : x(0), y(0) {}
  Point(const F& x, const F& y) : x(x), y(y) {}

  void swap(Point& other) { using std::swap; swap(x, other.x); swap(y, other.y); }
  template <class F1> explicit operator Point<F1> () const {
    return Point<F1>(static_cast<F1>(x), static_cast<F1>(y)); }
  template <class F1> Point& operator = (const Point<F1>& other) {
    x = other.x; y = other.y; return *this; }
  template <class F1> Point& operator += (const Point<F1>& other) {
    x += other.x; y += other.y; return *this; }
  template <class F1> Point& operator -= (const Point<F1>& other) {
    x -= other.x; y -= other.y; return *this; }
  template <class F1> Point& operator *= (const F1& factor) {
    x *= factor; y *= factor; return *this; }
  template <class F1> Point& operator /= (const F1& factor) {
    x /= factor; y /= factor; return *this; }
};

template <class F> int read(Point<F>& point) { return read(point.x, point.y) / 2; }
template <class F> int write(const Point<F>& point) { return write(point.x, point.y); }

template <class F> istream& operator >> (istream& is, Point<F>& point) {
  return is >> point.x >> point.y; }
template <class F> ostream& operator << (ostream& os, const Point<F>& point) {
  return os << point.x << ' ' << point.y; }

template <class F> inline Point<F> makePoint(const F& x, const F& y) { return Point<F>(x, y); }
template <class F> void swap(Point<F>& lhs, Point<F>& rhs) { lhs.swap(rhs); }

#define FUNC1(name, arg, expr) \
template <class F> inline auto name(const arg) -> decltype(expr) { return expr; }
#define FUNC2(name, arg1, arg2, expr) \
template <class F1, class F2> \
inline auto name(const arg1, const arg2) -> decltype(expr) { return expr; }
#define FUNC3(name, arg1, arg2, arg3, expr) \
template <class F1, class F2, class F3> \
inline auto name(const arg1, const arg2, const arg3) -> decltype(expr) { return expr; }

FUNC1(operator -, Point<F>& point, makePoint(-point.x, -point.y))
FUNC2(operator +, Point<F1>& lhs, Point<F2>& rhs, makePoint(lhs.x + rhs.x, lhs.y + rhs.y))
FUNC2(operator -, Point<F1>& lhs, Point<F2>& rhs, makePoint(lhs.x - rhs.x, lhs.y - rhs.y))
FUNC2(operator *, F1& factor, Point<F2>& rhs, makePoint(factor * rhs.x, factor * rhs.y))
FUNC2(operator *, Point<F1>& lhs, F2& factor, makePoint(lhs.x * factor, lhs.y * factor))
FUNC2(operator /, Point<F1>& lhs, F2& factor, makePoint(lhs.x / factor, lhs.y / factor))

FUNC2(operator *, Point<F1>& lhs, Point<F2>& rhs, lhs.x * rhs.x + lhs.y * rhs.y)
FUNC2(operator ^, Point<F1>& lhs, Point<F2>& rhs, lhs.x * rhs.y - lhs.y * rhs.x)

// < 0 if rhs <- lhs counter-clockwise, 0 if collinear, > 0 if clockwise.
FUNC2(ccw, Point<F1>& lhs, Point<F2>& rhs, rhs ^ lhs)
FUNC3(ccw, Point<F1>& lhs, Point<F2>& rhs, Point<F3>& origin, ccw(lhs - origin, rhs - origin))

FUNC2(operator ==, Point<F1>& lhs, Point<F2>& rhs, lhs.x == rhs.x && lhs.y == rhs.y)
FUNC2(operator !=, Point<F1>& lhs, Point<F2>& rhs, !(lhs == rhs))

FUNC2(operator <, Point<F1>& lhs, Point<F2>& rhs,
    lhs.y < rhs.y || (lhs.y == rhs.y && lhs.x < rhs.x))
FUNC2(operator >, Point<F1>& lhs, Point<F2>& rhs, rhs < lhs)
FUNC2(operator <=, Point<F1>& lhs, Point<F2>& rhs, !(lhs > rhs))
FUNC2(operator >=, Point<F1>& lhs, Point<F2>& rhs, !(lhs < rhs))

// Angles and rotations (counter-clockwise).
FUNC1(angle, Point<F>& point, atan2(point.y, point.x))
FUNC2(angle, Point<F1>& lhs, Point<F2>& rhs, atan2(lhs ^ rhs, lhs * rhs))
FUNC3(angle, Point<F1>& lhs, Point<F2>& rhs, Point<F3>& origin,
      angle(lhs - origin, rhs - origin))
FUNC3(rotate, Point<F1>& point, F2& angleSin, F3& angleCos,
      makePoint(angleCos * point.x - angleSin * point.y,
                angleSin * point.x + angleCos * point.y))
FUNC2(rotate, Point<F1>& point, F2& angle, rotate(point, sin(angle), cos(angle)))
FUNC3(rotate, Point<F1>& point, F2& angle, Point<F3>& origin,
      origin + rotate(point - origin, angle))
FUNC1(perp, Point<F>& point, makePoint(-point.y, point.x))

// Distances.
FUNC1(abs, Point<F>& point, point * point)
FUNC1(norm, Point<F>& point, sqrt(abs(point)))
FUNC2(dist, Point<F1>& lhs, Point<F2>& rhs, norm(lhs - rhs))
FUNC2(dist2, Point<F1>& lhs, Point<F2>& rhs, abs(lhs - rhs))
FUNC2(bisector, Point<F1>& lhs, Point<F2>& rhs, lhs * norm(rhs) + rhs * norm(lhs))

#undef FUNC1
#undef FUNC2
#undef FUNC3
template <class F>
struct Line {
  Point<F> a, ab;
  Line() : a(), ab() {}
  Line(const Point<F>& a, const Point<F>& b, bool twoPoints = true)
    : a(a), ab(twoPoints ? b - a : b) {}
  Line(const F& xa, const F& ya, const F& xb, const F& yb)
    : a(xa, ya), ab(xb - xa, yb - ya) {}

  void swap(Line& other) { using std::swap; swap(a, other.a); swap(ab, other.ab); }
  template <class F1> explicit operator Line<F1> () const {
    return Line<F1>(Point<F1>(a), Point<F1>(ab), false); }
  template <class F1> Line& operator = (const Line<F1>& other) {
    a = other.a; ab = other.ab; return *this; }

  Point<F> b() const { return a + ab; }
  operator bool () const { return ab != Point<F>(); }
};

template <class F> int read(Line<F>& line) {
  int res = read(line.a, line.ab) / 2;
  return line.ab -= line.a, res;
}

template <class F>
inline Line<F> makeLine(const Point<F>& a, const Point<F>& b, bool twoPoints = true) {
  return Line<F>(a, b, twoPoints);
}

template <class F> void swap(Line<F>& lhs, Line<F>& rhs) { lhs.swap(rhs); }
template <class F1, class F2>
bool onLine(const Point<F1>& point, const Line<F2>& line) {
  if (!line) return point == line.a;
  return ((point - line.a) ^ line.ab) == 0;
}
template <class F1, class F2>
bool onSegment(const Point<F1>& point, const Line<F2>& seg) {
  if (!seg) return point == seg.a;
  auto vecta = seg.a - point, vectb = seg.b() - point;
  return (vecta ^ vectb) == 0 && (vecta * vectb) <= 0;
}
template <class F1, class F2> using distF = decltype(sqrt(F1() + F2()));

template <class F1, class F2>
distF<F1, F2> distLine(const Point<F1>& point, const Line<F2>& line) {
  if (!line) return dist(point, line.a);
  return abs((point - line.a) ^ line.ab) / norm(line.ab);
}
template <class F1, class F2>
distF<F1, F2> distSegment(const Point<F1>& point, const Line<F2>& seg) {
  if (((point - seg.a) * seg.ab) <= 0) return dist(point, seg.a);
  if (((point - seg.b()) * seg.ab) >= 0) return dist(point, seg.b());
  return distLine(point, seg);
}
template <class F1, class F2, class F3>
void projection(const Point<F1>& point, const Line<F2>& line, Point<F3>& res) {
  res = line.a;
  if (line) res += line.ab * static_cast<F3>((point - line.a) * line.ab) / abs(line.ab);
}

template <class F1, class F2, class F3>
void reflection(const Point<F1>& point, const Line<F2>& line, Point<F3>& res) {
  projection(point, line, res);
  res = 2 * res - point;
}
template <class F1, class F2, class F3>
void closest(const Point<F1>& point, const Line<F2>& seg, Point<F3>& res) {
  if (((point - seg.a) * seg.ab) <= 0) res = seg.a;
  else if (((point - seg.b()) * seg.ab) >= 0) res = seg.b();
  else projection(point, seg, res);
}
template <int TYPE> struct EndpointChecker {};
template <> struct EndpointChecker<0> {  // no endpoint (ray)
  template <class F> bool operator ()(const F& a, const F& b) const { return true; }};
template <> struct EndpointChecker<1> {  // closed endpoint
  template <class F> bool operator ()(const F& a, const F& b) const { return a <= b; }};
template <> struct EndpointChecker<2> {  // open endpoint
  template <class F> bool operator ()(const F& a, const F& b) const { return a < b; }};

template <int LA, int LB, int RA, int RB, class F1, class F2, class F3>
bool intersectLines(const Line<F1>& lhs, const Line<F2>& rhs, Point<F3>& res) {
  assert(lhs && rhs);
  auto s = lhs.ab ^ rhs.ab;
  if (s == 0) return false;
  auto ls = (rhs.a - lhs.a) ^ rhs.ab;
  auto rs = (rhs.a - lhs.a) ^ lhs.ab;
  if (s < 0) s = -s, ls = -ls, rs = -rs;
  bool intersect =
    EndpointChecker<LA>()(decltype(ls)(0), ls) && EndpointChecker<LB>()(ls, s) &&
    EndpointChecker<RA>()(decltype(rs)(0), rs) && EndpointChecker<RB>()(rs, s);
  if (intersect) res = lhs.a + lhs.ab * static_cast<F3>(ls) / s;
  return intersect;
}

template <class F1, class F2, class F3>
bool intersectClosedSegments(const Line<F1>& lhs, const Line<F2>& rhs, Point<F3>& res) {
  return intersectLines<1, 1, 1, 1>(lhs, rhs, res);
}
template <class F1, class F2, class F3>
bool intersectSegments(const Line<F1>& lhs, const Line<F2>& rhs, Line<F3>& res) {
  auto s = lhs.ab ^ rhs.ab;
  auto ls = (rhs.a - lhs.a) ^ rhs.ab;
  if (s == 0) {
    if (ls != 0) return false;
    auto lhsa = lhs.a, lhsb = lhs.b();
    auto rhsa = rhs.a, rhsb = rhs.b();
    if (lhsa > lhsb) swap(lhsa, lhsb);
    if (rhsa > rhsb) swap(rhsa, rhsb);
    res = Line<F3>(max(lhsa, rhsa), min(lhsb, rhsb));
    return res.ab >= Point<F3>();
  }
  auto rs = (rhs.a - lhs.a) ^ lhs.ab;
  if (s < 0) s = -s, ls = -ls, rs = -rs;
  bool intersect = 0 <= ls && ls <= s && 0 <= rs && rs <= s;
  if (intersect)
    res = Line<F3>(lhs.a + lhs.ab * static_cast<F3>(ls) / s, Point<F3>());
  return intersect;
}
template <class F>
struct AngleCompare {
  const Point<F> origin;
  const bool zero;

  AngleCompare(const Point<F>& origin = Point<F>())
    : origin(origin), zero(origin == Point<F>()) {}

  template <class F1, class F2>
  bool operator () (const Point<F1>& lhs, const Point<F2>& rhs) const {
    return zero ? ccw(lhs, rhs) < 0 : ccw(lhs, rhs, origin) < 0;
  }
};

template <class Iterator, class F>
void sortByAngle(Iterator first, Iterator last, const Point<F>& origin) {
  first = partition(first, last, [&origin](const decltype(*first)& point) {
    return point == origin; });
  auto pivot = partition(first, last, [&origin](const decltype(*first)& point) {
    return point > origin; });
  AngleCompare<F> acmp(origin);
  sort(first, pivot, acmp);
  sort(pivot, last, acmp);
}
short sgn[MAX];
ll n;
Point<ll>v[MAX];
pll  fun(ll i,Point<ll> a,Point<ll> b)
{
  //debug4(a.x,a.y,b.x,b.y);
  if(i==n+1)return {1,1};
  ll m=min(abs(v[i]),abs(a));
  m=min(m,abs(b));
  short sgna=1,sgnb=1;
  if(abs(v[i]-a)<=m){
    pll retsgn=fun(i+1,v[i]-a,b);
    sgn[i]=retsgn.fi;
    sgna=-retsgn.fi;
    sgnb=retsgn.se;
  }
  else if(abs(v[i]+a)<=m){
    pll retsgn=fun(i+1,v[i]+a,b);
    sgn[i]=retsgn.fi;
    sgna=retsgn.fi;
    sgnb=retsgn.se;
  }
  else if(abs(v[i]+b)<=m){
    pll retsgn=fun(i+1,v[i]+b,a);
    sgn[i]=retsgn.fi;
    sgna=retsgn.se;
    sgnb=retsgn.fi;
  }
  else if(abs(v[i]-b)<=m){
    pll retsgn=fun(i+1,v[i]-b,a);
    sgn[i]=retsgn.fi;
    sgna=retsgn.se;
    sgnb=-retsgn.fi;
  }
  else if(abs(a-b)<=m){
    pll retsgn=fun(i+1,a-b,v[i]);
    sgn[i]=retsgn.se;
    sgna=retsgn.fi;
    sgnb=-retsgn.fi;
  }
  else{
    pll retsgn=fun(i+1,a+b,v[i]);
    sgn[i]=retsgn.se;
    sgna=retsgn.fi;
    sgnb=retsgn.fi;
  }
  return {sgna,sgnb};
}
int main()
{
    boost;
    cout<<fixed<<setprecision(12);
    #ifndef ONLINE_JUDGE
      freopen("input.txt","r",stdin);
      freopen("output01.txt","w",stdout);
    #endif
  cin>>n;
  for(int i=1;i<=n;i++){
    cin>>v[i];
    sgn[i]=1;
  }
  if(n==1){
    cout<<1;
    return 0;
  }
  pll retsgn=fun(3,v[1],v[2]);
  sgn[1]=retsgn.fi;
  sgn[2]=retsgn.se;
  for(int i=1;i<=n;i++)cout<<sgn[i]<<' ';

}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef pair<int, int> pii;

const int MN = 100010;

lf abs(pii a) {
    return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}

ll cross(pii a, pii b) {
    return 1LL * a.first * b.second - 1LL * a.second * b.first;
}

bool check(pii a, pii b, int t) {
    if(t) return (lf) cross(a, b) + 1e-9 >= abs(a) * abs(b);
    else return cross(a, b) >= 0;
}

int N;

struct Info {
    pii p;
    int flip;
    int id;
    bool operator <(const Info &i) const {
        if(cross(p, i.p)) return cross(p, i.p) > 0;
        else return id < i.id;
    }
};
set<Info> st;
int fa[MN], rnk[MN], Xor[MN];
void init() {
    for(int i = 0; i < N; i++) {
        fa[i] = i;
        rnk[i] = 0;
    }
}
int find(int u) {
    if(fa[u] == u) return u;
    else return find(fa[u]);
}
int color(int u) {
    if(fa[u] == u) return 0;
    else return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
    if(rnk[u] < rnk[v]) swap(u, v);
    fa[v] = u;
    if(t) Xor[v] = 1;
    if(rnk[u] == rnk[v]) rnk[u]++;
}

int main() {
    scanf("%d", &N);

    for(int i = 0; i < N; i++) {
        int x, y; scanf("%d %d", &x, &y);
        int flip = 0;
        if(y < 0) {
            x = -x;
            y = -y;
            flip = 1;
        }
        else if(y == 0 && x < 0) {
            x = -x;
            flip = 1;
        }
        st.insert({ {x, y}, flip, i });
    }

    if(N == 1) {
        printf("1");
        return 0;
    }

    init();
    while(st.size() >= 2) {
        int sz = st.size();

        //cout << sz << endl;

        Info info1 = *st.begin(); st.erase(info1);
        Info info2 = *st.begin(); st.erase(info2);
        Info info3;
        if(st.size()) {
            info3 = *st.begin();
            st.erase(info3);
        }
        else info3 = info2;
        Info info;

        if(check(info1.p, info2.p, sz >= 3)) {
            if(sz >= 3) st.insert(info3);

            mrg(info1.id, info2.id, info1.flip ^ info2.flip ^ 1);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first - info2.p.first, info1.p.second - info2.p.second };
            }
            else {
                info.flip = info2.flip;
                info.p = { info2.p.first - info1.p.first, info2.p.second - info1.p.second };
            }
        }
        else if(sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
            if(sz >= 3) st.insert(info1);

            mrg(info2.id, info3.id, info2.flip ^ info3.flip ^ 1);
            info.id = find(info2.id);
            if(info1.id == info.id) {
                info.flip = info2.flip;
                info.p = { info2.p.first - info3.p.first, info2.p.second - info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info3.p.first - info2.p.first, info3.p.second - info2.p.second };
            }
        }
        else {
            if(sz >= 3) st.insert(info2);

            mrg(info1.id, info3.id, info1.flip ^ info3.flip);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
        }

        if(info.p.second < 0) {
            info.p.first = -info.p.first;
            info.p.second = -info.p.second;
            info.flip ^= 1;
        }
        else if(info.p.second == 0 && info.p.first < 0) {
            info.p.first = -info.p.first;
            info.flip ^= 1;
        }
        st.insert(info);
    }

    for(int i = 0; i < N; i++) {
        if(color(i)) printf("1 ");
        else printf("-1 ");
    }
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double lf;
typedef pair<int, int> pii;

const int MN = 100010;

lf abs(pii a) {
    return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}

ll cross(pii a, pii b) {
    return 1LL * a.first * b.second - 1LL * a.second * b.first;
}
ll dot(pii a, pii b) {
    return 1LL * a.first * b.first + 1LL * a.second * b.second;
}

bool check(pii a, pii b, int t) {
    if(t) return (lf) dot(a, b) * 2 + 1e-12 >= abs(a) * abs(b);
    else return dot(a, b) >= 0;
}

int N;

struct Info {
    pii p;
    int flip;
    int id;
    bool operator <(const Info &i) const {
        if(cross(p, i.p)) return cross(p, i.p) > 0;
        else return id < i.id;
    }
};
set<Info> st;
int fa[MN], rnk[MN], Xor[MN];
void init() {
    for(int i = 0; i < N; i++) {
        fa[i] = i;
        rnk[i] = 0;
    }
}
int find(int u) {
    if(fa[u] == u) return u;
    else return find(fa[u]);
}
int color(int u) {
    if(fa[u] == u) return 0;
    else return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
    if(rnk[u] < rnk[v]) swap(u, v);
    fa[v] = u;
    if(t) Xor[v] = 1;
    if(rnk[u] == rnk[v]) rnk[u]++;
}

int main() {
    cout << fixed;
    cout.precision(20);

    scanf("%d", &N);

    for(int i = 0; i < N; i++) {
        int x, y; scanf("%d %d", &x, &y);
        int flip = 0;
        if(y < 0) {
            x = -x;
            y = -y;
            flip = 1;
        }
        else if(y == 0 && x < 0) {
            x = -x;
            flip = 1;
        }
        st.insert({ {x, y}, flip, i });
    }

    if(N == 1) {
        printf("1");
        return 0;
    }

    init();
    while(st.size() >= 2) {
        int sz = st.size();

        /*
        cout << sz << endl;
        for(set<Info>::iterator it = st.begin(); it != st.end(); it++) {
            Info info = *it;
            cout << info.p.first << ' ' << info.p.second << ' ' << info.flip << ' ' << info.id << ' ' << abs(info.p) << endl;
        }
        //*/

        Info info1 = *st.begin(); st.erase(info1);
        Info info2 = *st.begin(); st.erase(info2);
        Info info3;
        if(sz >= 3) info3 = *st.begin(), st.erase(info3);
        else info3 = info2;
        Info info;

        if(check(info1.p, info2.p, sz >= 3)) {
            if(sz >= 3) st.insert(info3);

            mrg(info1.id, info2.id, info1.flip ^ info2.flip ^ 1);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first - info2.p.first, info1.p.second - info2.p.second };
            }
            else {
                info.flip = info2.flip;
                info.p = { info2.p.first - info1.p.first, info2.p.second - info1.p.second };
            }
        }
        else if(sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
            if(sz >= 3) st.insert(info1);

            mrg(info2.id, info3.id, info2.flip ^ info3.flip ^ 1);
            info.id = find(info2.id);
            if(info2.id == info.id) {
                info.flip = info2.flip;
                info.p = { info2.p.first - info3.p.first, info2.p.second - info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info3.p.first - info2.p.first, info3.p.second - info2.p.second };
            }
        }
        else {
            if(sz >= 3) st.insert(info2);

            mrg(info1.id, info3.id, info1.flip ^ info3.flip);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
        }

        if(info.p.second < 0) {
            info.p.first = -info.p.first;
            info.p.second = -info.p.second;
            info.flip ^= 1;
        }
        else if(info.p.second == 0 && info.p.first < 0) {
            info.p.first = -info.p.first;
            info.flip ^= 1;
        }
        st.insert(info);
    }

    //cout << abs(st.begin()->p) << endl;

    for(int i = 0; i < N; i++) {
        if(color(i)) printf("1 ");
        else printf("-1 ");
    }
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef pair<int, int> pii;

const int MN = 100010;

lf abs(pii a) {
    return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}

ll cross(pii a, pii b) {
    return 1LL * a.first * b.second - 1LL * a.second * b.first;
}

bool check(pii a, pii b, int t) {
    if(t) return (lf) cross(a, b) + 1e-9 >= abs(a) * abs(b);
    else return cross(a, b) >= 0;
}

int N;

struct Info {
    pii p;
    int flip;
    int id;
    bool operator <(const Info &i) const {
        if(cross(p, i.p)) return cross(p, i.p) > 0;
        else return id < i.id;
    }
};
set<Info> st;
int fa[MN], rnk[MN], Xor[MN];
void init() {
    for(int i = 0; i < N; i++) {
        fa[i] = i;
        rnk[i] = 0;
    }
}
int find(int u) {
    if(fa[u] == u) return u;
    else return find(fa[u]);
}
int color(int u) {
    if(fa[u] == u) return 0;
    else return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
    if(rnk[u] < rnk[v]) swap(u, v);
    fa[v] = u;
    if(t) Xor[v] = 1;
    if(rnk[u] == rnk[v]) rnk[u]++;
}

int main() {
    scanf("%d", &N);

    for(int i = 0; i < N; i++) {
        int x, y; scanf("%d %d", &x, &y);
        int flip = 0;
        if(y < 0) {
            x = -x;
            y = -y;
            flip = 1;
        }
        else if(y == 0 && x < 0) {
            x = -x;
            flip = 1;
        }
        st.insert({ {x, y}, flip, i });
    }

    if(N == 1) {
        printf("1");
        return 0;
    }

    init();
    while(st.size() >= 2) {
        int sz = st.size();

        //cout << sz << endl;

        Info info1 = *st.begin(); st.erase(info1);
        Info info2 = *st.begin(); st.erase(info2);
        Info info3;
        if(st.size()) {
            info3 = *st.begin();
            st.erase(info3);
        }
        else info3 = info2;
        Info info;

        if(check(info1.p, info2.p, sz >= 3)) {
            if(sz >= 3) st.insert(info3);

            mrg(info1.id, info2.id, 1);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first - info2.p.first, info1.p.second - info2.p.second };
            }
            else {
                info.flip = info2.flip;
                info.p = { info2.p.first - info1.p.first, info2.p.second - info1.p.second };
            }
        }
        else if(sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
            if(sz >= 3) st.insert(info1);

            mrg(info2.id, info3.id, 1);
            info.id = find(info2.id);
            if(info1.id == info.id) {
                info.flip = info2.flip;
                info.p = { info2.p.first - info3.p.first, info2.p.second - info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info3.p.first - info2.p.first, info3.p.second - info2.p.second };
            }
        }
        else {
            if(sz >= 3) st.insert(info2);

            mrg(info1.id, info3.id, 0);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
        }

        if(info.p.second < 0) {
            info.p.first = -info.p.first;
            info.p.second = -info.p.second;
            info.flip ^= 1;
        }
        else if(info.p.second == 0 && info.p.first < 0) {
            info.p.first = -info.p.first;
            info.flip ^= 1;
        }
        st.insert(info);
    }

    for(int i = 0; i < N; i++) {
        if(color(i)) printf("1 ");
        else printf("-1 ");
    }
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double lf;
typedef pair<int, int> pii;

const int MN = 100010;

lf abs(pii a) {
    return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}

ll cross(pii a, pii b) {
    return 1LL * a.first * b.second - 1LL * a.second * b.first;
}
ll dot(pii a, pii b) {
    return 1LL * a.first * b.first + 1LL * a.second * b.second;
}

bool check(pii a, pii b, int t) {
    if(t) return (lf) dot(a, b) * 2 + 1e-12 >= abs(a) * abs(b);
    else return dot(a, b) >= 0;
}

int N;

struct Info {
    pii p;
    int flip;
    int id;
    bool operator <(const Info &i) const {
        if(cross(p, i.p)) return cross(p, i.p) < 0;
        else return id > i.id;
    }
};
priority_queue<Info> pq;
int fa[MN], rnk[MN], Xor[MN];
void init() {
    for(int i = 0; i < N; i++) {
        fa[i] = i;
        rnk[i] = 0;
    }
}
int find(int u) {
    if(fa[u] == u) return u;
    else return find(fa[u]);
}
int color(int u) {
    if(fa[u] == u) return 0;
    else return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
    if(rnk[u] < rnk[v]) swap(u, v);
    fa[v] = u;
    if(t) Xor[v] = 1;
    if(rnk[u] == rnk[v]) rnk[u]++;
}

int main() {
    cout << fixed;
    cout.precision(20);

    scanf("%d", &N);

    for(int i = 0; i < N; i++) {
        int x, y; scanf("%d %d", &x, &y);
        int flip = 0;
        if(y < 0) {
            x = -x;
            y = -y;
            flip = 1;
        }
        else if(y == 0 && x < 0) {
            x = -x;
            flip = 1;
        }
        pq.push({ {x, y}, flip, i });
    }

    if(N == 1) {
        printf("1");
        return 0;
    }

    init();
    while(pq.size() >= 2) {
        int sz = pq.size();

        /*
        cout << sz << endl;
        for(set<Info>::iterator it = st.begin(); it != st.end(); it++) {
            Info info = *it;
            cout << info.p.first << ' ' << info.p.second << ' ' << info.flip << ' ' << info.id << ' ' << abs(info.p) << endl;
        }
        //*/

        Info info1 = pq.top(); pq.pop();
        Info info2 = pq.top(); pq.pop();
        Info info3;
        if(sz >= 3) {
            info3 = pq.top(); pq.pop();
        }
        else info3 = info2;
        Info info;

        if(check(info1.p, info2.p, sz >= 3)) {
            if(sz >= 3) pq.push(info3);

            mrg(info1.id, info2.id, info1.flip ^ info2.flip ^ 1);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first - info2.p.first, info1.p.second - info2.p.second };
            }
            else {
                info.flip = info2.flip;
                info.p = { info2.p.first - info1.p.first, info2.p.second - info1.p.second };
            }
        }
        else if(sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
            if(sz >= 3) pq.push(info1);

            mrg(info2.id, info3.id, info2.flip ^ info3.flip ^ 1);
            info.id = find(info2.id);
            if(info2.id == info.id) {
                info.flip = info2.flip;
                info.p = { info2.p.first - info3.p.first, info2.p.second - info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info3.p.first - info2.p.first, info3.p.second - info2.p.second };
            }
        }
        else {
            if(sz >= 3) pq.push(info2);

            mrg(info1.id, info3.id, info1.flip ^ info3.flip);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
        }

        if(info.p.second < 0) {
            info.p.first = -info.p.first;
            info.p.second = -info.p.second;
            info.flip ^= 1;
        }
        else if(info.p.second == 0 && info.p.first < 0) {
            info.p.first = -info.p.first;
            info.flip ^= 1;
        }
        pq.push(info);
    }

    //cout << abs(st.begin()->p) << endl;

    for(int i = 0; i < N; i++) {
        if(color(i)) printf("1 ");
        else printf("-1 ");
    }
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef pair<int, int> pii;

const int MN = 100010;

lf abs(pii a) {
    return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}

ll cross(pii a, pii b) {
    return 1LL * a.first * b.second - 1LL * a.second * b.first;
}

bool check(pii a, pii b, int t) {
    if(t) return (lf) cross(a, b) * 2 + 1e-9 >= abs(a) * abs(b);
    else return cross(a, b) >= 0;
}

int N;

struct Info {
    pii p;
    int flip;
    int id;
    bool operator <(const Info &i) const {
        if(cross(p, i.p)) return cross(p, i.p) > 0;
        else return id < i.id;
    }
};
set<Info> st;
int fa[MN], rnk[MN], Xor[MN];
void init() {
    for(int i = 0; i < N; i++) {
        fa[i] = i;
        rnk[i] = 0;
    }
}
int find(int u) {
    if(fa[u] == u) return u;
    else return find(fa[u]);
}
int color(int u) {
    if(fa[u] == u) return 0;
    else return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
    if(rnk[u] < rnk[v]) swap(u, v);
    fa[v] = u;
    if(t) Xor[v] = 1;
    if(rnk[u] == rnk[v]) rnk[u]++;
}

int main() {
    scanf("%d", &N);

    for(int i = 0; i < N; i++) {
        int x, y; scanf("%d %d", &x, &y);
        int flip = 0;
        if(y < 0) {
            x = -x;
            y = -y;
            flip = 1;
        }
        else if(y == 0 && x < 0) {
            x = -x;
            flip = 1;
        }
        st.insert({ {x, y}, flip, i });
    }

    if(N == 1) {
        printf("1");
        return 0;
    }

    init();
    while(st.size() >= 2) {
        int sz = st.size();

        /*
        cout << sz << endl;
        for(set<Info>::iterator it = st.begin(); it != st.end(); it++) {
            Info info = *it;
            cout << info.p.first << ' ' << info.p.second << ' ' << info.flip << ' ' << info.id << endl;
        }
        //*/

        Info info1 = *st.begin(); st.erase(info1);
        Info info2 = *st.begin(); st.erase(info2);
        Info info3;
        if(sz >= 3) info3 = *st.begin(), st.erase(info3);
        else info3 = info2;
        Info info;

        if(check(info1.p, info2.p, sz >= 3)) {
            if(sz >= 3) st.insert(info3);

            mrg(info1.id, info2.id, info1.flip ^ info2.flip ^ 1);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first - info2.p.first, info1.p.second - info2.p.second };
            }
            else {
                info.flip = info2.flip;
                info.p = { info2.p.first - info1.p.first, info2.p.second - info1.p.second };
            }
        }
        else if(sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
            if(sz >= 3) st.insert(info1);

            mrg(info2.id, info3.id, info2.flip ^ info3.flip ^ 1);
            info.id = find(info2.id);
            if(info1.id == info.id) {
                info.flip = info2.flip;
                info.p = { info2.p.first - info3.p.first, info2.p.second - info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info3.p.first - info2.p.first, info3.p.second - info2.p.second };
            }
        }
        else {
            if(sz >= 3) st.insert(info2);

            mrg(info1.id, info3.id, info1.flip ^ info3.flip);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
        }

        if(info.p.second < 0) {
            info.p.first = -info.p.first;
            info.p.second = -info.p.second;
            info.flip ^= 1;
        }
        else if(info.p.second == 0 && info.p.first < 0) {
            info.p.first = -info.p.first;
            info.flip ^= 1;
        }
        st.insert(info);
    }

    for(int i = 0; i < N; i++) {
        if(color(i)) printf("1 ");
        else printf("-1 ");
    }
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double lf;
typedef pair<int, int> pii;

const int MN = 100010;

lf abs(pii a) {
    return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}

ll cross(pii a, pii b) {
    return 1LL * a.first * b.second - 1LL * a.second * b.first;
}
ll dot(pii a, pii b) {
    return 1LL * a.first * b.first + 1LL * a.second * b.second;
}

bool check(pii a, pii b, int t) {
    if(t) return (lf) dot(a, b) * 2 + 1e-12 >= abs(a) * abs(b);
    else return dot(a, b) >= 0;
}

int N;

struct Info {
    pii p;
    int flip;
    int id;
    bool operator <(const Info &i) const {
        if(cross(p, i.p)) return cross(p, i.p) > 0;
        else return id < i.id;
    }
};
set<Info> st;
int fa[MN], rnk[MN], Xor[MN];
void init() {
    for(int i = 0; i < N; i++) {
        fa[i] = i;
        rnk[i] = 0;
    }
}
int find(int u) {
    if(fa[u] == u) return u;
    else return find(fa[u]);
}
int color(int u) {
    if(fa[u] == u) return 0;
    else return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
    if(rnk[u] < rnk[v]) swap(u, v);
    fa[v] = u;
    if(t) Xor[v] = 1;
    if(rnk[u] == rnk[v]) rnk[u]++;
}

int main() {
    cout << fixed;
    cout.precision(20);

    scanf("%d", &N);

    for(int i = 0; i < N; i++) {
        int x, y; scanf("%d %d", &x, &y);
        int flip = 0;
        if(y < 0) {
            x = -x;
            y = -y;
            flip = 1;
        }
        else if(y == 0 && x < 0) {
            x = -x;
            flip = 1;
        }
        st.insert({ {x, y}, flip, i });
    }

    if(N == 1) {
        printf("1");
        return 0;
    }

    init();
    while(st.size() >= 2) {
        int sz = st.size();

        /*
        cout << sz << endl;
        for(set<Info>::iterator it = st.begin(); it != st.end(); it++) {
            Info info = *it;
            cout << info.p.first << ' ' << info.p.second << ' ' << info.flip << ' ' << info.id << ' ' << abs(info.p) << endl;
        }
        //*/

        Info info1 = *st.begin(); st.erase(info1);
        Info info2 = *st.begin(); st.erase(info2);
        Info info3;
        if(sz >= 3) info3 = *st.begin(), st.erase(info3);
        else info3 = info2;
        Info info;

        if(check(info1.p, info2.p, sz >= 3)) {
            if(sz >= 3) st.insert(info3);

            mrg(info1.id, info2.id, info1.flip ^ info2.flip ^ 1);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first - info2.p.first, info1.p.second - info2.p.second };
            }
            else {
                info.flip = info2.flip;
                info.p = { info2.p.first - info1.p.first, info2.p.second - info1.p.second };
            }
        }
        else if(sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
            if(sz >= 3) st.insert(info1);

            mrg(info2.id, info3.id, info2.flip ^ info3.flip ^ 1);
            info.id = find(info2.id);
            if(info1.id == info.id) {
                info.flip = info2.flip;
                info.p = { info2.p.first - info3.p.first, info2.p.second - info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info3.p.first - info2.p.first, info3.p.second - info2.p.second };
            }
        }
        else {
            if(sz >= 3) st.insert(info2);

            mrg(info1.id, info3.id, info1.flip ^ info3.flip);
            info.id = find(info1.id);
            if(info1.id == info.id) {
                info.flip = info1.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
            else {
                info.flip = info3.flip;
                info.p = { info1.p.first + info3.p.first, info1.p.second + info3.p.second };
            }
        }

        if(info.p.second < 0) {
            info.p.first = -info.p.first;
            info.p.second = -info.p.second;
            info.flip ^= 1;
        }
        else if(info.p.second == 0 && info.p.first < 0) {
            info.p.first = -info.p.first;
            info.flip ^= 1;
        }
        st.insert(info);
    }

    //cout << abs(st.begin()->p) << endl;

    for(int i = 0; i < N; i++) {
        if(color(i)) printf("1 ");
        else printf("-1 ");
    }
}