#include<bits/stdc++.h>

using namespace std;

#define ff(i, a, b) for(auto i=(a); (i <= (b)); ++i)
#define FF(i, a, b) for(auto i=(a); (i >= (b)); --i)
#define ll long long

const ll M = 1000000000000;
const int N = 200000 + 10;

struct re {
    ll x, y;

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

    re operator - (re a) {
        return (re) {x - a.x, y - a.y};
    }
};

ll dist(re a) {
    return a.x*a.x + a.y*a.y;
}

struct result {
    int cs, x, y;
};

bool check(re a) {
    return dist(a) <= 1E12;
}

int n, cur, f[N];
re a[N];
vector<result> res;

ll Abs(ll x) {
    return (x > 0) ? x : -x;
}

int main() {
    cin >> n;
    ff(i, 1, n) cin >> a[i].x >> a[i].y;

    if (n == 1) cout << 1; else {
        set<int> b;
        vector<int> p;
        cur = n;
        ff(i, 1, n) {
            b.insert(i);
            if (b.size() == 3) {
                p.clear();
                p.insert(p.begin(), b.begin(), b.end());
                if (check(a[p[0]] + a[p[1]])) res.push_back((result) {++cur, p[0], p[1]}), b.erase(p[0]), b.erase(p[1]); else
                if (check(a[p[0]] - a[p[1]])) res.push_back((result) {++cur, p[0], -p[1]}), b.erase(p[0]), b.erase(p[1]); else
                if (check(a[p[0]] + a[p[2]])) res.push_back((result) {++cur, p[0], p[2]}), b.erase(p[0]), b.erase(p[2]); else
                if (check(a[p[0]] - a[p[2]])) res.push_back((result) {++cur, p[0], -p[2]}), b.erase(p[0]), b.erase(p[2]); else
                if (check(a[p[1]] + a[p[2]])) res.push_back((result) {++cur, p[1], p[2]}), b.erase(p[1]), b.erase(p[2]); else
                if (check(a[p[1]] - a[p[2]])) res.push_back((result) {++cur, p[1], -p[2]}), b.erase(p[1]), b.erase(p[2]);
                a[cur] = (res.back().y > 0) ? a[res.back().x] + a[res.back().y] : a[res.back().x] - a[-res.back().y];
                b.insert(cur);
            }
        }

        p.clear();
        p.insert(p.begin(), b.begin(), b.end());
        if (check(a[p[0]] + a[p[1]])) res.push_back((result) {++cur, p[0], p[1]}), b.erase(p[0]), b.erase(p[1]); else
        if (check(a[p[0]] - a[p[1]])) res.push_back((result) {++cur, p[0], -p[1]}), b.erase(p[0]), b.erase(p[1]);

        f[cur] = 1;
        for (auto i = res.rbegin(); i != res.rend(); i++) {
            auto u = *i;
            //cout << u.cs << " " << u.x << " " << u.y << endl;
            f[u.x] = f[u.cs];
            f[Abs(u.y)] = (u.y > 0) ? f[u.cs] : -f[u.cs];
        }

        ff(i, 1, n) cout << f[i] << " ";

        //re tmp = (re) {0, 0};
        //ff(i, 1, n) tmp = (f[i] > 0) ? tmp + a[i] : tmp - a[i];
        //cout << endl << tmp.x << " " << tmp.y << " " << dist(tmp);
    }
}
//This code belongs to s34vv1nd


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return 1LL * x[i] * x[i] + 1LL * y[i] * y[i] >= 1LL * x[j] * x[j] + 1LL * y[j] * y[j];
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	//sort(id, id + n, comp);
	long long lst = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	assert(lst <= 1500000LL * 1500000LL);
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return abs(x[i])) <= abs(x[j]);
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	sort(id, id + n, comp);
	long long lst = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	assert(lst <= 1500000LL * 1500000LL);
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return max(abs(x[i]), abs(y[i])) >= max(abs(x[j]), abs(y[j]));
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	sort(id, id + n, comp);
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		assert(res <= 1500000LL * 1500000LL);
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		if (a[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) <= 1500000LL * 1500000) {
				c[i] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) <= 1500000LL * 1500000) {
					c[i] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
			assert(was);
		}
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		if (a[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return 1LL * x[i] * x[i] + 1LL * y[i] * y[i] >= 1LL * x[j] * x[j] + 1LL * y[j] * y[j];
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	sort(id, id + n, comp);
	long long lst = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	assert(lst <= 1500000LL * 1500000LL);
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return 1LL * x[i] * x[i] + 1LL * y[i] * y[i] <= 1LL * x[j] * x[j] + 1LL * y[j] * y[j];
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	sort(id, id + n, comp);
	long long lst = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	assert(lst <= 1500000LL * 1500000LL);
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];
int xs[MAXN], ys[MAXN];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
		xs[i] = x[i];
		ys[i] = y[i];
	}
	while (true) {
	random_shuffle(id, id + n);
	for (int i = 0; i < n; i++) {
		x[i] = xs[i];
		y[i] = ys[i];
	}
	long long lst = 0;
	curx = 0;
	cury = 0;
	last = 0;
	st = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	if (lst <= 1500000LL * 1500000LL) {
		break;
	}
	}
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return abs(x[i]) <= abs(x[j]);
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	sort(id, id + n, comp);
	long long lst = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	assert(lst <= 1500000LL * 1500000LL);
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) <= 1500000LL * 1500000) {
				c[i] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) <= 1500000LL * 1500000) {
					c[i] = last ^ t;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
			assert(was);
		}
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		if (a[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) <= 1500000LL * 1500000) {
				c[i] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = c[i];
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) <= 1500000LL * 1500000) {
					c[i] = last ^ t;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = c[i];
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
			assert(was);
		}
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		if (a[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


/*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░░░▀▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▀▄
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░░░▌▌░▌▌░░░░░
░░░░░░░░░▄▄▌▌▄▌▌░░░░░
 */
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>

using namespace std;
template<typename T1, typename T2>inline void chkmin(T1 &x, T2 y) { if (x > y) x = y; }
template<typename T1, typename T2>inline void chkmax(T1 &x, T2 y) { if (x < y) x = y; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) { return _out; } _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) { _out << ", (" << _it->first << ": " << _it->second << ')'; } return _out; }
#define sz(c) (int)(c).size()
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define left left228
#define right right228
#define next next228
#define rank rank228
#define prev prev228
#define y1 y1228
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define files(FILENAME) read(FILENAME), write(FILENAME)
#define pb push_back
const string FILENAME = "input";
const int MAXN = 100001;

int n;
int x[MAXN], y[MAXN];
int c[MAXN];
int a[MAXN];
int id[MAXN];
int reals[MAXN];

bool comp(int i, int j) {
	return max(abs(x[i]), abs(y[i])) <= max(abs(x[j]), abs(y[j]));
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read(FILENAME);
	cin >> n;
	int curx = 0, cury = 0;
	int last = 0;
	int st = 0;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		id[i] = i;
	}
	sort(id, id + n, comp);
	long long lst = 0;
	for (int i1 = 0; i1 < n; i1++) {
		int i = id[i1];
		long long res = 1e18;
		for (int t = 0; t < 2; t++) {
			for (int t1 = 0; t1 < 2; t1++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				chkmin(res, 1LL * nx * nx + 1LL * ny * ny);
				x[i] *= -1;
				y[i] *= -1;
			}
			curx *= -1;
			cury *= -1;
		}
		bool was = false;
		for (int t = 0; t < 2; t++) {
			int nx = curx + x[i];
			int ny = cury + y[i];
			if ((1LL * nx * nx + 1LL * ny * ny) == res) {
				c[i1] = last ^ t;
				if (i == 0) {
					st = t;
				}
				was = true;
				curx = nx;
				cury = ny;
				last = t;
				break;
			}
			x[i] *= -1;
			y[i] *= -1;
		}
		if (!was) {
			st ^= 1;
			last ^= 1;
			curx *= -1;
			cury *= -1;
			for (int t = 0; t < 2; t++) {
				int nx = curx + x[i];
				int ny = cury + y[i];
				if ((1LL * nx * nx + 1LL * ny * ny) == res) {
					c[i1] = t ^ last;
					if (i == 0) {
						st = t;
					}
					was = true;
					curx = nx;
					cury = ny;
					last = t;
					break;
				}
				x[i] *= -1;
				y[i] *= -1;
			}
		}
		lst = res;
		//cout << res << endl;
		//cout << curx << ' ' << cury << ' ' << i + 1 << endl;
	}
	assert(lst <= 1500000LL * 1500000LL);
	//cout << curx << ' ' << cury << endl;
	for (int i = 0; i < n; i++) {
		if (i == 0) {
			a[i] = st;
		} else {
			if (c[i]) {
				a[i] = a[i - 1] ^ 1;
			} else {
				a[i] = a[i - 1];
			}
		}
		reals[id[i]] = a[i];
	}
	for (int i = 0; i < n; i++) {
		if (reals[i] == 0) {
			cout << 1 << ' ';
		} else {
			cout << -1 << ' ';
		}
	}
	cout << '\n';
	return 0;
}


#include<bits/stdc++.h>
#define ll  long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

struct node{
 int x,y,id;
 node(){}
 node(int x,int y,int i): x(x),y(y),id(i){}
}h[N];
int ans[N];
queue<node> q;
int ok(node a,node b)
{
    ll x=a.x+b.x,y=a.y+b.y;
    if(x*x+y*y<=1e12) return 1;
    x=a.x-b.x; y=a.y-b.y;
    if(x*x+y*y<=1e12) return 2;
    return 0;
}
int be[N],dp[N];
int dfs(int x)
{
    if(dp[x]!=-2) return dp[x];
    if(be[x]==0) return dp[x]=ans[x];
    dp[x]=ans[x]*dfs(be[x]);
    return dp[x];
}
int32_t main()
{
   ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
   int n;  cin>>n;
   int x,y;
   for(int i=1;i<=n;i++)  cin>>x>>y,q.push(node(x,y,i));
   if(n==1) return cout<<1,0;
   int cc=n;
   while(q.size()>2)
   {
       node t1=q.front(); q.pop();
       node t2=q.front(); q.pop();
       node t3=q.front(); q.pop();
       int t;
       if(t=ok(t1,t2))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t2.id]=1,q.push(node(t1.x+t2.x,t1.y+t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t2.id]=-1,q.push(node(t1.x-t2.x,t1.y-t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
       }
       else if(t=ok(t1,t3))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t3.id]=1,q.push(node(t1.x+t3.x,t1.y+t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t3.id]=-1,q.push(node(t1.x-t3.x,t1.y-t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
       }
       else if(t=ok(t3,t2))
       {
           if(t==1)
           {
               ans[t3.id]=1,ans[t2.id]=1,q.push(node(t3.x+t2.x,t3.y+t2.y,++cc)),q.push(t1);
               be[t1.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t3.id]=1,ans[t2.id]=-1,q.push(node(t3.x-t2.x,t3.y-t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
       }
   }
   while(!q.empty())
   {
       node t=q.front(); ans[t.id]=1; q.pop();
   }
   for(int i=1;i<=cc;i++)  dp[i]=-2;//cout<<ans[i]<<endl;
   for(int i=1;i<=n;i++)  if(dp[i]==-2) dp[i]=dfs(i);
   for(int i=1;i<=n;i++)  cout<<dp[i]<<" ";
return 0;
}
/*

*/


#include<bits/stdc++.h>
#define ll  long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

struct node{
 int x,y,id;
 node(){}
 node(int x,int y,int i): x(x),y(y),id(i){}
}h[N];
int ans[N];
queue<node> q;
int ok(node a,node b)
{
    ll x=a.x+b.x,y=a.y+b.y;
    if(x*x+y*y<=1e12) return 1;
    x=a.x-b.x; y=a.y-b.y;
    if(x*x+y*y<=1e12) return 2;
    return 0;
}
int be[N],dp[N];
int dfs(int x)
{
    if(dp[x]!=-2) return dp[x];
    if(be[x]==0) return dp[x]=ans[x];
    dp[x]=ans[x]*dfs(be[x]);
    return dp[x];
}
int32_t main()
{
   ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
   int n;  cin>>n;
   int x,y;
   for(int i=1;i<=n;i++)  cin>>x>>y,q.push(node(x,y,i));
   if(n==1) return cout<<1,0;
   int cc=n;
   while(q.size()>2)
   {
       node t1=q.front(); q.pop();
       node t2=q.front(); q.pop();
       node t3=q.front(); q.pop();
       int t;
       if(t=ok(t1,t2))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t2.id]=1,q.push(node(t1.x+t2.x,t1.y+t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t2.id]=-1,q.push(node(t1.x-t2.x,t1.y-t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
       }
       else if(t=ok(t1,t3))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t3.id]=1,q.push(node(t1.x+t3.x,t1.y+t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t3.id]=-1,q.push(node(t1.x-t3.x,t1.y-t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
       }
       else if(t=ok(t3,t2))
       {
           if(t==1)
           {
               ans[t3.id]=1,ans[t2.id]=1,q.push(node(t3.x+t2.x,t3.y+t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t3.id]=1,ans[t2.id]=-1,q.push(node(t3.x-t2.x,t3.y-t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
       }
   }
   while(!q.empty())
   {
       node t=q.front(); ans[t.id]=1; q.pop();
   }
   for(int i=1;i<=cc;i++)  dp[i]=-2;//cout<<ans[i]<<endl;
   for(int i=1;i<=n;i++)  if(dp[i]==-2) dp[i]=dfs(i);
   for(int i=1;i<=n;i++)  cout<<dp[i]<<" ";
return 0;
}
/*

*/


#include<bits/stdc++.h>
#define ll  long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

struct node{
 int x,y,id;
 node(){}
 node(int x,int y,int i): x(x),y(y),id(i){}
};
int ans[N];
stack<node> q;
int ok(node a,node b)
{
    ll x=a.x+b.x,y=a.y+b.y;
    if(x*x+y*y<=1e12) return 1;
    x=a.x-b.x; y=a.y-b.y;
    if(x*x+y*y<=1e12) return 2;
    return 0;
}
int be[N],dp[N];
int dfs(int x)
{
    if(dp[x]!=-2) return dp[x];
    if(be[x]==0) return dp[x]=ans[x];
    dp[x]=ans[x]*dfs(be[x]);
    return dp[x];
}
int32_t main()
{
   ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
   int n;  cin>>n;
   int x,y;
   for(int i=1;i<=n;i++)  cin>>x>>y,q.push(node(x,y,i));
   if(n==1) return cout<<1,0;
   int cc=n;
   while(q.size()>2)
   {
       node t1=q.top(); q.pop();
       node t2=q.top(); q.pop();
       node t3=q.top(); q.pop();
       int t;
       if(t=ok(t1,t2))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t2.id]=1,q.push(node(t1.x+t2.x,t1.y+t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t2.id]=-1,q.push(node(t1.x-t2.x,t1.y-t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
       }
       else if(t=ok(t1,t3))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t3.id]=1,q.push(node(t1.x+t3.x,t1.y+t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t3.id]=-1,q.push(node(t1.x-t3.x,t1.y-t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
       }
       else if(t=ok(t3,t2))
       {
           if(t==1)
           {
               ans[t3.id]=1,ans[t2.id]=1,q.push(node(t3.x+t2.x,t3.y+t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t3.id]=1,ans[t2.id]=-1,q.push(node(t3.x-t2.x,t3.y-t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
       }
   }
   while(!q.empty())
   {
       node t=q.top(); ans[t.id]=1; q.pop();
   }
   for(int i=1;i<=cc;i++)  dp[i]=-2;//cout<<ans[i]<<endl;
   for(int i=1;i<=n;i++)  if(dp[i]==-2) dp[i]=dfs(i);
   for(int i=1;i<=n;i++)  cout<<dp[i]<<" ";
return 0;
}
/*

*/


#include<bits/stdc++.h>
#define ll  long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

struct node{
 int x,y,id;
 node(){}
 node(int x,int y,int i): x(x),y(y),id(i){}
};
int ans[N];
stack<node> q;
int ok(node a,node b)
{
    ll x=a.x+b.x,y=a.y+b.y;
    if(x*x+y*y<=1e12) return 1;
    x=a.x-b.x; y=a.y-b.y;
    if(x*x+y*y<=1e12) return 2;
    return 0;
}
int be[N],dp[N];
int dfs(int x)
{
    if(dp[x]!=-2) return dp[x];
    if(be[x]==0) return dp[x]=ans[x];
    dp[x]=ans[x]*dfs(be[x]);
    return dp[x];
}
int32_t main()
{
   ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
   int n;  cin>>n;
   int x,y;
   for(int i=1;i<=n;i++)  cin>>x>>y,q.push(node(x,y,i));
   if(n==1) return cout<<1,0;
   int cc=n;
   while(q.size()>2)
   {
       node t1=q.top(); q.pop();
       node t2=q.top(); q.pop();
       node t3=q.top(); q.pop();
       int t;
       if(t=ok(t1,t2))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t2.id]=1,q.push(node(t1.x+t2.x,t1.y+t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t2.id]=-1,q.push(node(t1.x-t2.x,t1.y-t2.y,++cc)),q.push(t3);
               be[t1.id]=be[t2.id]=cc;
           }
       }
       else if(t=ok(t1,t3))
       {
           if(t==1)
           {
               ans[t1.id]=1,ans[t3.id]=1,q.push(node(t1.x+t3.x,t1.y+t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
           else
           {
               ans[t1.id]=1,ans[t3.id]=-1,q.push(node(t1.x-t3.x,t1.y-t3.y,++cc)),q.push(t2);
               be[t1.id]=be[t3.id]=cc;
           }
       }
       else if(t=ok(t3,t2))
       {
           if(t==1)
           {
               ans[t3.id]=1,ans[t2.id]=1,q.push(node(t3.x+t2.x,t3.y+t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
           else
           {
               ans[t3.id]=1,ans[t2.id]=-1,q.push(node(t3.x-t2.x,t3.y-t2.y,++cc)),q.push(t1);
               be[t3.id]=be[t2.id]=cc;
           }
       }
   }
   {
       node t1=q.top(); q.pop();
       node t2=q.top();
       ll xx=t1.x+t2.x,yy=t1.y+t2.y;
       if(xx*xx+yy*yy<=2.25e12) ans[t1.id]=ans[t2.id]=1; else ans[t1.id]=1,ans[t2.id]=-1;
   }
   for(int i=1;i<=cc;i++)  dp[i]=-2;//cout<<ans[i]<<endl;
   for(int i=1;i<=n;i++)  if(dp[i]==-2) dp[i]=dfs(i);
   for(int i=1;i<=n;i++)  cout<<dp[i]<<" ";
return 0;
}
/*

*/


#include<bits/stdc++.h>
#define ll long long
#define ljc 998244353
using namespace std;
/*
*/
#ifdef Fading
#define gc getchar
#endif
#ifndef Fading
inline char gc(){
    static char now[1<<16],*S,*T;
    if (T==S){T=(S=now)+fread(now,1,1<<16,stdin);if (T==S) return EOF;}
    return *S++;
}
#endif
inline ll read(){
    register ll x=0,f=1;char ch=gc();
    while (!isdigit(ch)){if(ch=='-')f=-1;ch=gc();}
    while (isdigit(ch)){x=(x<<3)+(x<<1)+ch-'0';ch=gc();}
    return (f==1)?x:-x;
}
ll n,op[1010101];
struct node{
	ll a,b,len;
}x[1010101];
inline bool cmp(node a,node b){
	return a.len>b.len;
}
signed main(){
	srand(time(NULL));
	n=read();
	for (int i=1;i<=n;i++){
		x[i].a=read(),x[i].b=read(),x[i].len=x[i].a*x[i].a+x[i].b*x[i].b;
	}
	while (1){
		random_shuffle(x+1,x+1+n);
		ll X=x[1].a,Y=x[1].b;
		for (int i=2;i<=n;i++){
			if ((X+x[i].a)*(X+x[i].a)+(Y+x[i].b)*(Y+x[i].b)<(X-x[i].a)*(X-x[i].a)+(Y-x[i].b)*(Y-x[i].b)){
				X+=x[i].a;Y+=x[i].b;
			}else{
				X-=x[i].a;Y-=x[i].b;
			}
		}
		if (sqrt(X*X+Y*Y)>=1500000) continue;
		putchar('1');putchar(' ');
		X=x[1].a,Y=x[1].b;
		for (int i=2;i<=n;i++){
			if ((X+x[i].a)*(X+x[i].a)+(Y+x[i].b)*(Y+x[i].b)<(X-x[i].a)*(X-x[i].a)+(Y-x[i].b)*(Y-x[i].b)){
				putchar('1');putchar(' ');X+=x[i].a;Y+=x[i].b;
			}else{
				putchar('-');putchar('1');putchar(' ');X-=x[i].a;Y-=x[i].b;
			}
		}
		return 0;
	}
	return 0;
}


//so just a rebel without a cause,

#include <bits/stdc++.h>

using namespace std;

#define mx 300005
#define int long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define f first
#define s second

string str[4];
int x[mx], y[mx], dir[mx], vis[mx];
vector <int> v;

int32_t main(){
    //freopen("in.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m, k, p, a, b, c, a1, b1, a2, b2;
    srand (time(NULL));
    while(cin >> n){
        double lim = (1.5*1000000);
        lim = lim*lim;
        for(int i=0;i<n;i++){
            cin >> x[i] >> y[i];
            v.push_back(i);
        }
        while(1){
            a = b = 0;
            random_shuffle(v.begin(), v.end());
            for(int j=0;j<v.size();j++){
                int i = v[j];
                a1 = a+x[i];
                b1 = b+y[i];
                a2 = a-x[i];
                b2 = b-y[i];
                k = a1*a1 + b1*b1;
                m = a2*a2 + b2*b2;
                if(k<=m){
                    dir[i] = 1;
                    a = a1;
                    b = b1;
                    p = k;
                }
                else{
                    dir[i] = -1;
                    a = a2;
                    b = b2;
                    p = k;
                }
            }
            double tmp = (double) (p);
            if(tmp<=lim) break;
        }
        for(int i=0;i<n;i++) cout << dir[i] << " ";
        cout << endl;
        v.clear();
    }
    return 0;
}


//so just a rebel without a cause,

#include <bits/stdc++.h>

using namespace std;

#define mx 300005
#define int long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define f first
#define s second

string str[4];
int x[mx], y[mx];

int32_t main(){
    //freopen("in.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m, k, p, a, b, c, a1, b1, a2, b2;
    while(cin >> n){
        double lim = (1.5*1000000);
        lim = lim*lim;
        for(int i=0;i<n;i++){
            cin >> x[i] >> y[i];
        }
        a = b = 0;
        for(int i=0;i<n;i++){
            a1 = a+x[i];
            b1 = b+y[i];
            a2 = a-x[i];
            b2 = b-y[i];
            k = a1*a1 + b1*b1;
            m = a2*a2 + b2*b2;
            if(k<=m){
                cout << 1 <<" ";
                a = a1;
                b = b1;
            }
            else{
                cout << -1 << " ";
                a = a2;
                b = b2;
            }
        }
        cout << endl;
    }
    return 0;
}


//so just a rebel without a cause,

#include <bits/stdc++.h>

using namespace std;

#define mx 300005
#define int long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define f first
#define s second

string str[4];
int x[mx], y[mx], dir[mx], vis[mx];
vector <int> v;

int32_t main(){
    //freopen("in.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m, k, p, a, b, c, a1, b1, a2, b2;
    srand (time(NULL));
    while(cin >> n){
        double lim = (1.5*1000000);
        lim = lim*lim;
        for(int i=0;i<n;i++){
            cin >> x[i] >> y[i];
            v.push_back(i);
        }
        while(1){
            a = b = 0;
            random_shuffle(v.begin(), v.end());
            for(int j=0;j<v.size();j++){
                int i = v[j];
                a1 = a+x[i];
                b1 = b+y[i];
                a2 = a-x[i];
                b2 = b-y[i];
                k = a1*a1 + b1*b1;
                m = a2*a2 + b2*b2;
                if(k<=m){
                    dir[i] = 1;
                    a = a1;
                    b = b1;
                    p = k;
                }
                else{
                    dir[i] = -1;
                    a = a2;
                    b = b2;
                    p = m;
                }
            }
            double tmp = (double) (p);
            if(tmp<=lim) break;
        }
        for(int i=0;i<n;i++) cout << dir[i] << " ";
        cout << endl;
        v.clear();
    }
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

struct Point {
    long long x, y;

    Point(long long xx = 0, long long yy = 0) {
        x = xx;
        y = yy;
    }

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

    long long dist() const {
        return x * x + y * y;
    }

    Point operator - (const Point& other) {
        return Point(x - other.x, y - other.y);
    }

    Point operator + (const Point& other) {
        return Point(x + other.x, y + other.y);
    }
};

const long long INV = 1e12;
const int N = 1e5;

int sign[2 * N];

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

    int n;
    cin >> n;
    if (n == 1) {
        cout << 1;
        return 0;
    }

    Point p[3];
    int ii[3];
    for (int i = 0; i < 2; ++i) {
        p[i].read();
        ii[i] = i;
    }

    int out = n;
    for (int in = 2; in < n; ++in) {
        p[2].read();
        ii[2] = in;
        bool solved = false;
        for (int x = 0; x < 3 && !solved; ++x) {
            for (int y = x + 1; y < 3 && !solved; ++y) {
                for (int k = 0; k <= 1 && !solved; ++k) {
                    Point pp = (k ? p[x] + p[y] : p[x] - p[y]);
                    if (pp.dist() <= INV) {
                        sign[ii[x]] = out;
                        sign[ii[y]] = (k ? out : -out);
                        p[x] = pp;
                        ii[x] = out++;
                        swap(p[2], p[y]);
                        swap(ii[2], ii[y]);
                        solved = true;
                    }
                }
            }
        }
    }

    if ((p[0] + p[1]).dist() <= INV) {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    } else {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    }

    sign[out] = 1;
    for (int i = out - 1; i >= 0; --i) {
        if (sign[i] > 0) {
            sign[i] = sign[sign[i]];
        } else {
            sign[i] = -sign[-sign[i]];
        }
    }
    for (int i = 0; i < n; ++i) {
        cout << sign[i] << ' ';
    }

    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

struct Point {
    long long x, y;

    Point(long long xx = 0, long long yy = 0) {
        x = xx;
        y = yy;
    }

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

    long long dist() const {
        return x * x + y * y;
    }

    Point operator - (const Point& other) {
        return Point(x - other.x, y - other.y);
    }

    Point operator + (const Point& other) {
        return Point(x + other.x, y + other.y);
    }
};

const long long INV = 1e12;
const int N = 1e5;

int sign[2 * N];

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

    int n;
    cin >> n;
    if (n == 1) {
        cout << 1;
        return 0;
    }

    Point p[3];
    int ii[3];
    for (int i = 0; i < 2; ++i) {
        p[i].read();
        ii[i] = i;
    }

    int out = n;
    for (int in = 2; in < n; ++in) {
        p[2].read();
        ii[2] = in;
        bool solved = false;
        for (int x = 0; x < 3 && !solved; ++x) {
            for (int y = x + 1; y < 3 && !solved; ++y) {
                for (int k = 0; k <= 1 && !solved; ++k) {
                    Point pp = (k ? p[x] + p[y] : p[x] - p[y]);
                    if (pp.dist() <= INV) {
                        sign[ii[x]] = out;
                        sign[ii[y]] = -out;
                        p[x] = pp;
                        ii[x] = out++;
                        swap(p[2], p[y]);
                        swap(ii[2], ii[y]);
                        solved = true;
                    }
                }
            }
        }
    }

    if ((p[0] + p[1]).dist() <= INV) {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    } else {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    }

    sign[out] = 1;
    for (int i = out - 1; i >= 0; --i) {
        if (sign[i] > 0) {
            sign[i] = sign[sign[i]];
        } else {
            sign[i] = -sign[-sign[i]];
        }
    }
    for (int i = 0; i < n; ++i) {
        cout << sign[i] << ' ';
    }

    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

struct Point {
    long long x, y;

    Point(long long xx = 0, long long yy = 0) {
        x = xx;
        y = yy;
    }

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

    long long dist() const {
        return x * x + y * y;
    }

    Point operator - (const Point& other) {
        return Point(x - other.x, y - other.y);
    }

    Point operator + (const Point& other) {
        return Point(x + other.x, y + other.y);
    }
};

const long long INV = 1e12;
const int N = 1e5;

int sign[2 * N];

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

    int n;
    cin >> n;
    if (n == 1) {
        cout << 1;
        return 0;
    }

    Point p[3];
    int ii[3];
    for (int i = 0; i < 2; ++i) {
        p[i].read();
        ii[i] = i;
    }

    int out = n;
    for (int in = 2; in < n; ++in) {
        p[2].read();
        ii[2] = in;
        bool solved = false;
        for (int x = 0; x < 3 && !solved; ++x) {
            for (int y = x + 1; y < 3 && !solved; ++y) {
                for (int k = 0; k <= 1; ++k) {
                    Point pp = (k ? p[x] + p[y] : p[x] - p[y]);
                    if (pp.dist() <= INV) {
                        sign[ii[x]] = out;
                        sign[ii[y]] = -out;
                        p[x] = pp;
                        ii[x] = out++;
                        swap(p[2], p[y]);
                        swap(ii[2], ii[y]);
                        solved = true;
                    }
                }
            }
        }
    }

    if ((p[0] + p[1]).dist() <= INV) {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    } else {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    }

    sign[out] = 1;
    for (int i = out - 1; i >= 0; --i) {
        if (sign[i] > 0) {
            sign[i] = sign[sign[i]];
        } else {
            sign[i] = -sign[-sign[i]];
        }
    }
    for (int i = 0; i < n; ++i) {
        cout << sign[i] << ' ';
    }

    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

struct Point {
    long long x, y;

    Point(long long xx = 0, long long yy = 0) {
        x = xx;
        y = yy;
    }

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

    long long dist() const {
        return x * x + y * y;
    }

    Point operator - (const Point& other) {
        return Point(x - other.x, y - other.y);
    }

    Point operator + (const Point& other) {
        return Point(x + other.x, y + other.y);
    }
};

const long long INV = 1e12;
const int N = 1e5;

int sign[2 * N];

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

    int n;
    cin >> n;
    if (n == 1) {
        cout << 1;
        return 0;
    }

    Point p[3];
    int ii[3];
    for (int i = 0; i < 2; ++i) {
        p[i].read();
        ii[i] = i;
    }

    int out = n;
    for (int in = 2; in < n; ++in) {
        p[2].read();
        ii[2] = in;
        bool solved = false;
        for (int x = 0; x < 3 && !solved; ++x) {
            for (int y = x + 1; y < 3 && !solved; ++y) {
                for (int k = 0; k <= 1 && !solved; ++k) {
                    Point pp = (k ? p[x] + p[y] : p[x] - p[y]);
                    if (pp.dist() <= INV) {
                        sign[ii[x]] = out;
                        sign[ii[y]] = (k ? out : -out);
                        p[x] = pp;
                        ii[x] = out++;
                        swap(p[2], p[y]);
                        swap(ii[2], ii[y]);
                        solved = true;
                    }
                }
            }
        }
    }

    if ((p[0] + p[1]).dist() <= INV) {
        sign[ii[0]] = out;
        sign[ii[1]] = out;
    } else {
        sign[ii[0]] = out;
        sign[ii[1]] = -out;
    }

    sign[out] = 1;
    for (int i = out - 1; i >= 0; --i) {
        if (sign[i] > 0) {
            sign[i] = sign[sign[i]];
        } else {
            sign[i] = -sign[-sign[i]];
        }
    }
    for (int i = 0; i < n; ++i) {
        cout << sign[i] << ' ';
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int x[N], y[N];
int n;
/*
2000000 0
1000000 5
*/
int ans[N];

inline ll calc(ll x, ll y) {
    return x * x + y * y;
}
int id[N];

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    srand(time(NULL));
    fo(i, n) id[i] = i;
    fo(i, n) cin >> x[i] >> y[i], id[i] = i;
    do {
        int X = 0, Y = 0;
        fo(i, n) {
            int nx1 = abs(X + x[i]);
            int ny1 = abs(Y + y[i]);
            int nx2 = abs(X - x[i]);
            int ny2 = abs(Y - y[i]);
            if (max(nx1, ny1) <= max(nx2, ny2)) {
                X += x[i];
                Y += y[i];
                ans[id[i]] = 1;
            } else {
                X -= x[i];
                Y -= y[i];
                ans[id[i]] = -1;
            }
        }
        if(calc(X, Y) <= 1500000ll * 1500000) {
            fo(i, n) cout << ans[i] << ' ';
            return 0;
        }
        fo(i, n) {
            int j = rand() % n + 1;
            swap(x[j], x[i]);
            swap(y[i], y[j]);
            swap(id[i], id[j]);
        }
    } while(true);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int x[N], y[N];
int n;
/*
2000000 0
1000000 5
*/
int ans[N];
int id[N];

inline ll calc(ll x, ll y) {
    return x * x + y * y;
}
int id[N];

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    srand(time(NULL));
    fo(i, n) id[i] = i;
    fo(i, n) cin >> x[i] >> y[i], id[i] = i;
    do {
        int X = 0, Y = 0;
        fo(i, n) {
            int nx1 = abs(X + x[i]);
            int ny1 = abs(Y + y[i]);
            int nx2 = abs(X - x[i]);
            int ny2 = abs(Y - y[i]);
            if (max(nx1, ny1) <= max(nx2, ny2)) {
                X += x[i];
                Y += y[i];
                ans[id[i]] = 1;
            } else {
                X -= x[i];
                Y -= y[i];
                ans[id[i]] = -1;
            }
        }
        if(calc(X, Y) <= 1500000ll * 1500000) {
            fo(i, n) cout << ans[i] << ' ';
            return 0;
        }
        fo(i, n) {
            int j = rand() % n + 1;
            swap(x[j], x[i]);
            swap(y[i], y[j]);
            swap(id[i], id[j]);
        }
    } while(true);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int x[N], y[N];
int n;
/*
2000000 0
1000000 5
*/
int ans[N];

inline ll calc(ll x, ll y) {
    return x * x + y * y;
}
int id[N];

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    srand(time(NULL));
    fo(i, n) cin >> x[i] >> y[i], id[i] = i;
    do {
        int X = 0, Y = 0;
        fo(i, n) {
            int nx1 = abs(X + x[i]);
            int ny1 = abs(Y + y[i]);
            int nx2 = abs(X - x[i]);
            int ny2 = abs(Y - y[i]);
            if (max(nx1, ny1) <= max(nx2, ny2)) {
                X += x[i];
                Y += y[i];
                ans[i] = 1;
            } else {
                X -= x[i];
                Y -= y[i];
                ans[i] = -1;
            }
        }
        if(calc(X, Y) <= 1500000ll * 1500000) {
            fo(i, n) cout << ans[i] << ' ';
            return 0;
        }
        fo(i, n) {
            int j = rand() % n + 1;
            swap(x[j], x[i]);
            swap(y[i], y[j]);
        }
    } while(true);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int n;
int ans[N];
pair<int, pair<int, int> > a[N];

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    fo(i, n) cin >> a[i].first >> a[i].second.first;
    fo(i, n) a[i].second.second = i;
    sort(a + 1 , a+ n + 1);
    reverse(a + 1, a + n + 1);
    int x = 0, y = 0;
    fo(i, n) {
        int pnx = x + a[i].first, pny = y + a[i].second.first;
        int mnx = x - a[i].first, mny = y - a[i].second.first;
        if(abs(pnx) + abs(pny) < abs(mnx) +abs(mny)) {
            x = pnx, y = pny;
            ans[a[i].second.second] = 1;
        } else {
            x = mnx, y = mny;
            ans[a[i].second.second] = -1;
        }

    }
    fo(i, n) cout << ans[i] << ' ';
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int n;
int ans[N];
pair<int, pair<int, int> > a[N];

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    fo(i, n) cin >> a[i].first >> a[i].second.first;
    fo(i, n) a[i].second.second = i;
    sort(a + 1 , a+ n + 1);
    reverse(a + 1, a + n + 1);
    int x = 0, y = 0;
    fo(i, n) {
        int pnx = x + a[i].first, pny = y + a[i].second.first;
        int mnx = x - a[i].first, mny = y - a[i].second.first;
        if(max(abs(pnx), abs(pny)) < max(abs(mnx), abs(mny))) {
            x = pnx, y = pny;
            ans[a[i].second.second] = 1;
        } else {
            x = mnx, y = mny;
            ans[a[i].second.second] = -1;
        }

    }
    fo(i, n) cout << ans[i] << ' ';
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int x[N], y[N];
int n;
/*
2000000 0
1000000 5
*/

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    fo(i, n) cin >> x[i] >> y[i];
    int X = 0, Y = 0;
    fo(i, n) {
        int nx1 = abs(X + x[i]);
        int ny1 = abs(Y + y[i]);
        int nx2 = abs(X - x[i]);
        int ny2 = abs(Y - y[i]);
        if(max(nx1, ny1) <= max(nx2, ny2)) {
            X += x[i];
            Y += y[i];
            cout << "1 ";
        } else {
            X -= x[i];
            Y -= y[i];
            cout << "-1 ";
        }
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define fo(i, n) for(ll i = 1; i <= n; ++i)

typedef long long ll;

const int N = 500500;
const int mod = 1e9 + 7;
const ll inf = 1e18;
int n;
int ans[N];
pair<int, pair<int, int> > a[N];
inline ll calc(ll x, ll y) {
    return x * x + y * y;
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    fo(i, n) cin >> a[i].first >> a[i].second.first;
    fo(i, n) a[i].second.second = i;
    sort(a + 1 , a+ n + 1);
    reverse(a + 1, a + n + 1);
    int x = 0, y = 0;
    fo(i, n) {
        int pnx = x + a[i].first, pny = y + a[i].second.first;
        int mnx = x - a[i].first, mny = y - a[i].second.first;
        if(calc(pnx, pny) < calc(mnx, mny)) {
            x = pnx, y = pny;
            ans[a[i].second.second] = 1;
        } else {
            x = mnx, y = mny;
            ans[a[i].second.second] = -1;
        }

    }
    fo(i, n) cout << ans[i] << ' ';
    return 0;
}