Problem: For a vector \vec{v} = (x, y), define |v| = √{x^2 + y^2}.

Allen had a bit too much to drink at the bar, which is at the origin. There are n vectors \vec{v_1}, \vec{v_2}, ⋅⋅⋅, \vec{v_n}. Allen will make n moves. As Allen's sense of direction is impaired, during the i-th move he will either move in the direction \vec{v_i} or -\vec{v_i}. In other words, if his position is currently p = (x, y), he will either move to p + \vec{v_i} or p - \vec{v_i}.

Allen doesn't want to wander too far from home (which happens to also be the bar). You need to help him figure out a sequence of moves (a sequence of signs for the vectors) such that his final position p satisfies |p| ≤ 1.5 ⋅ 10^6 so that he can stay safe.

Input

The first line contains a single integer n (1 ≤ n ≤ 10^5) — the number of moves.

Each of the following lines contains two space-separated integers x_i and y_i, meaning that \vec{v_i} = (x_i, y_i). We have that |v_i| ≤ 10^6 for all i.

Output

Output a single line containing n integers c_1, c_2, ⋅⋅⋅, c_n, each of which is either 1 or -1. Your solution is correct if the value of p = ∑_{i = 1}^n c_i \vec{v_i}, satisfies |p| ≤ 1.5 ⋅ 10^6.

It can be shown that a solution always exists under the given constraints.

Examples

Input

3
999999 0
0 999999
999999 0


Output

1 1 -1 


Input

1
-824590 246031


Output

1 


Input

8
-67761 603277
640586 -396671
46147 -122580
569609 -2112
400 914208
131792 309779
-850150 -486293
5272 721899


Output

1 1 1 1 1 1 1 -1 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
bool ok(pair<ll, ll> v) {
  return (v.first * v.first + v.second * v.second) <= 1e12;
}
bool final_ok(pair<ll, ll> v) {
  return 4LL * (v.first * v.first + v.second * v.second) <= 9LL * 1e12;
}
struct node {
  shared_ptr<node> left, right;
  ll x, y;
  int idx = -1;
  bool sub = false;
};
inline pair<ll, ll> add(shared_ptr<node>& v1, shared_ptr<node>& v2) {
  ll x1 = v1->x, x2 = v2->x, y1 = v1->y, y2 = v2->y;
  return {x1 + x2, y1 + y2};
}
inline pair<ll, ll> sub(shared_ptr<node>& v1, shared_ptr<node>& v2) {
  ll x1 = v1->x, x2 = v2->x, y1 = v1->y, y2 = v2->y;
  return {x1 - x2, y1 - y2};
}
void print(shared_ptr<node> v) {
  if (v == nullptr) {
    return;
  }
  cout << v->x << ' ' << v->y << '\n';
  print(v->left);
  print(v->right);
}
void fill(shared_ptr<node>& v, int val, vector<int>& ans) {
  if (v->idx != -1) {
    ans[v->idx] = val;
    return;
  }
  fill(v->left, val, ans);
  fill(v->right, v->sub ? -val : val, ans);
}
void finish(vector<shared_ptr<node>>& v, vector<int>& ans) {
  if (v.size() == 1) {
    return;
  }
  auto v1 = v[0], v2 = v[1];
  shared_ptr<node> root(new node);
  root->left = v1;
  root->right = v2;
  if (final_ok(add(v1, v2))) {
    auto p = add(v1, v2);
    root->x = p.first;
    root->y = p.second;
  } else {
    auto p = sub(v1, v2);
    root->sub = true;
    root->x = p.first;
    root->y = p.second;
  }
  fill(root, 1, ans);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<shared_ptr<node>> v(n);
  vector<int> ans(n, 1);
  for (int i = 0; i < n; ++i) {
    ll x, y;
    cin >> x >> y;
    v[i] = shared_ptr<node>(new node);
    v[i]->x = x;
    v[i]->y = y;
    v[i]->idx = i;
  }
  while (v.size() > 2) {
    shared_ptr<node> vs[3];
    vs[0] = v.back();
    v.pop_back();
    vs[1] = v.back();
    v.pop_back();
    vs[2] = v.back();
    v.pop_back();
    bool done = false;
    for (int i = 0; i < 3 && !done; ++i) {
      for (int j = i + 1; j < 3; ++j) {
        int k = 3 - i - j;
        shared_ptr<node> new_v(new node);
        if (ok(add(vs[i], vs[j]))) {
          auto p = add(vs[i], vs[j]);
          new_v->x = p.first;
          new_v->y = p.second;
          new_v->left = vs[i];
          new_v->right = vs[j];
          done = true;
        } else if (ok(sub(vs[i], vs[j]))) {
          auto p = sub(vs[i], vs[j]);
          new_v->x = p.first;
          new_v->y = p.second;
          new_v->left = vs[i];
          new_v->right = vs[j];
          new_v->sub = true;
          done = true;
        }
        if (done) {
          v.emplace_back(new_v);
          v.emplace_back(vs[k]);
          break;
        }
      }
    }
  }
  finish(v, ans);
  for (int x : ans) {
    cout << x << ' ';
  }
  cout << '\n';
  return 0;
}