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;
inline int setBit(int N, int pos) { return N = N | (1 << pos); }
inline int resetBit(int N, int pos) { return N = N & ~(1 << pos); }
inline bool checkBit(int N, int pos) { return (bool)(N & (1 << pos)); }
struct Vector {
  long long int x, y;
  int id;
  long long int val() { return (x * x + y * y); }
  void print() {
    cerr << 38 << ": "
         << "x"
         << " = " << x << "   "
         << "y"
         << " = " << y << '\n';
  }
};
inline double angleBetween(Vector A, Vector O, Vector B) {
  Vector t1, t2;
  t1.x = A.x - O.x;
  t1.y = A.y - O.y;
  t2.x = B.x - O.x;
  t2.y = B.y - O.y;
  double theta = (atan2(t2.y, t2.x) - atan2(t1.y, t1.x));
  if (theta < 0) theta += 2 * acos(-1.00);
  if (fabs(theta - acos(-1.00)) < 1e-7) return acos(-1.00);
  if (theta > acos(-1.00) + 1e-7) theta = 2 * acos(-1.00) - theta;
  return theta;
}
vector<Vector> V;
vector<pair<int, int> > E[1000000 + 10];
int sltn[1000000 + 10];
void dfs(int node, int state) {
  if (E[node].size() == 0) {
    sltn[node] = state;
    return;
  }
  for (auto v : E[node]) dfs(v.first, state * v.second);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    V.push_back({x, y, i});
  }
  if (V.size() == 1) {
    puts("1");
    return 0;
  }
  int cnt = n;
  while (V.size() >= 3) {
    vector<Vector> tmp;
    for (int i = 0; i < 3; i++) tmp.push_back(V.back()), V.pop_back();
    bool done = 0;
    for (int i = 0; i < 3; i++) {
      for (int j = -1; j <= 1; j += 2) {
        for (int k = i + 1; k < 3; k++) {
          for (int q = -1; q <= 1; q += 2) {
            Vector A = tmp[i];
            Vector B = tmp[k];
            A.x *= j;
            A.y *= j;
            B.x *= q;
            B.y *= q;
            if (A.val() == 0 || B.val() == 0 ||
                angleBetween(A, {0, 0}, B) + 1e-7 >= 2 * acos(-1.00) / 3) {
              done = true;
              int taken[3] = {0};
              taken[i] = taken[k] = 1;
              for (int bla = 0; bla < 3; bla++) {
                if (!taken[bla]) V.push_back(tmp[bla]);
              }
              cnt++;
              Vector cur = {A.x + B.x, A.y + B.y, cnt};
              V.push_back(cur);
              assert(cur.val() <= 1e12);
              E[cnt].push_back({A.id, j});
              E[cnt].push_back({B.id, q});
              break;
            }
          }
          if (done) break;
        }
        if (done) break;
      }
      if (done) break;
    }
    assert(done);
  }
  bool done = false;
  double lim = (1.5e6) * (1.5e6);
  for (int i = -1; i < 2; i += 2) {
    for (int j = -1; j < 2; j += 2) {
      Vector A = V[0];
      Vector B = V[1];
      A.x *= i;
      A.y *= i;
      B.x *= j;
      B.y *= j;
      Vector tmp = {A.x + B.x, A.y + B.y};
      if ((tmp.x * tmp.x + tmp.y * tmp.y) <= (lim)) {
        cnt++;
        E[cnt].push_back({A.id, i});
        E[cnt].push_back({B.id, j});
        done = true;
        break;
      }
    }
    if (done) break;
  }
  dfs(cnt, 1);
  for (int i = 1; i <= n; i++) {
    if (i > 1) printf(" ");
    printf("%d", sltn[i]);
  }
  puts("");
  return 0;
}