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;
const int MN = 100010;
long double abs(pair<int, int> a) {
  return sqrt(1LL * a.first * a.first + 1LL * a.second * a.second);
}
long long cross(pair<int, int> a, pair<int, int> b) {
  return 1LL * a.first * b.second - 1LL * a.second * b.first;
}
long long dot(pair<int, int> a, pair<int, int> b) {
  return 1LL * a.first * b.first + 1LL * a.second * b.second;
}
bool check(pair<int, int> a, pair<int, int> b, int t) {
  if (t)
    return (long double)dot(a, b) * 2 + 1e-12 >= abs(a) * abs(b);
  else
    return dot(a, b) >= 0;
}
int N;
struct Info {
  pair<int, int> p;
  int flip;
  int id;
  bool operator<(const Info &i) const {
    if (cross(p, i.p))
      return cross(p, i.p) < 0;
    else
      return id > i.id;
  }
};
priority_queue<Info> pq;
int fa[MN], rnk[MN], Xor[MN];
void init() {
  for (int i = 0; i < N; i++) {
    fa[i] = i;
    rnk[i] = 0;
  }
}
int find(int u) {
  if (fa[u] == u)
    return u;
  else
    return find(fa[u]);
}
int color(int u) {
  if (fa[u] == u)
    return 0;
  else
    return color(fa[u]) ^ Xor[u];
}
void mrg(int u, int v, int t) {
  if (rnk[u] < rnk[v]) swap(u, v);
  fa[v] = u;
  if (t) Xor[v] = 1;
  if (rnk[u] == rnk[v]) rnk[u]++;
}
int main() {
  cout << fixed;
  cout.precision(20);
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    int flip = 0;
    if (y < 0) {
      x = -x;
      y = -y;
      flip = 1;
    } else if (y == 0 && x < 0) {
      x = -x;
      flip = 1;
    }
    pq.push({{x, y}, flip, i});
  }
  if (N == 1) {
    printf("1");
    return 0;
  }
  init();
  while (pq.size() >= 2) {
    int sz = pq.size();
    Info info1 = pq.top();
    pq.pop();
    Info info2 = pq.top();
    pq.pop();
    Info info3;
    if (sz >= 3) {
      info3 = pq.top();
      pq.pop();
    } else
      info3 = info2;
    Info info;
    if (check(info1.p, info2.p, sz >= 3)) {
      if (sz >= 3) pq.push(info3);
      mrg(info1.id, info2.id, info1.flip ^ info2.flip ^ 1);
      info.id = find(info1.id);
      if (info1.id == info.id) {
        info.flip = info1.flip;
        info.p = {info1.p.first - info2.p.first,
                  info1.p.second - info2.p.second};
      } else {
        info.flip = info2.flip;
        info.p = {info2.p.first - info1.p.first,
                  info2.p.second - info1.p.second};
      }
    } else if (sz >= 3 && check(info2.p, info3.p, sz >= 3)) {
      if (sz >= 3) pq.push(info1);
      mrg(info2.id, info3.id, info2.flip ^ info3.flip ^ 1);
      info.id = find(info2.id);
      if (info2.id == info.id) {
        info.flip = info2.flip;
        info.p = {info2.p.first - info3.p.first,
                  info2.p.second - info3.p.second};
      } else {
        info.flip = info3.flip;
        info.p = {info3.p.first - info2.p.first,
                  info3.p.second - info2.p.second};
      }
    } else {
      if (sz >= 3) pq.push(info2);
      mrg(info1.id, info3.id, info1.flip ^ info3.flip);
      info.id = find(info1.id);
      if (info1.id == info.id) {
        info.flip = info1.flip;
        info.p = {info1.p.first + info3.p.first,
                  info1.p.second + info3.p.second};
      } else {
        info.flip = info3.flip;
        info.p = {info1.p.first + info3.p.first,
                  info1.p.second + info3.p.second};
      }
    }
    if (info.p.second < 0) {
      info.p.first = -info.p.first;
      info.p.second = -info.p.second;
      info.flip ^= 1;
    } else if (info.p.second == 0 && info.p.first < 0) {
      info.p.first = -info.p.first;
      info.flip ^= 1;
    }
    pq.push(info);
  }
  for (int i = 0; i < N; i++) {
    if (color(i))
      printf("1 ");
    else
      printf("-1 ");
  }
}