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;
long long mod = 1e9 + 7;
long long mx_error = 15 * 1e5;
struct delta {
  int idx;
  long long dx, dy;
  bool operator<(const delta& other) const {
    return dx * dx + dy * dy < other.dx * other.dx + other.dy + other.dy;
  }
};
long long sgn(long long x) {
  if (x >= 0) return 1;
  return -1;
}
int get_q(long long x, long long y) {
  int dir_x = 0;
  int dir_y = 0;
  if (sgn(x) == -1) dir_x = 1;
  if (sgn(y) == -1) dir_y = 1;
  int res = 0;
  res |= (dir_x);
  res |= (dir_y << 1);
  return res;
}
long long not_good_error(long long x, long long y) {
  if (x > mx_error || y > mx_error) return true;
  return x * x + y * y > mx_error * mx_error;
}
bool cmp_x(delta a, delta b) { return a.dx > b.dx; }
bool cmp_y(delta a, delta b) { return a.dy > b.dy; }
int ans[100009];
int main() {
  long long px = 0, py = 0;
  int n;
  scanf("%d", &n);
  vector<delta> vx_pos;
  vector<delta> vx_neg;
  vector<delta> vy_pos;
  vector<delta> vy_neg;
  for (int i = 0; i < n; i++) {
    int dx, dy;
    scanf("%d %d", &dx, &dy);
    px += dx;
    py += dy;
    ans[i] = 1;
    if (dx >= 0)
      vx_pos.push_back({i, dx, dy});
    else
      vx_neg.push_back({i, dx, dy});
    if (dy >= 0)
      vy_pos.push_back({i, dx, dy});
    else
      vy_neg.push_back({i, dx, dy});
  }
  sort(vx_pos.begin(), vx_pos.end(), cmp_x);
  sort(vx_neg.begin(), vx_neg.end(), cmp_x);
  sort(vy_pos.begin(), vy_pos.end(), cmp_y);
  sort(vy_pos.begin(), vy_pos.end(), cmp_y);
  int i_pos = 0;
  int i_neg = (int)vx_neg.size() - 1;
  int j_pos = 0;
  int j_neg = (int)vy_neg.size() - 1;
  while (not_good_error(px, py)) {
    delta d;
    if (abs(px) >= abs(py)) {
      if (px >= 0) {
        while (ans[vx_pos[i_pos].idx] == -1) i_pos++;
        d = vx_pos[i_pos];
      } else {
        while (ans[vx_neg[i_neg].idx] == -1) i_neg--;
        d = vx_neg[i_neg];
      }
    } else {
      if (py >= 0) {
        while (ans[vy_pos[j_pos].idx] == -1) j_pos++;
        d = vy_pos[j_pos];
      } else {
        while (ans[vy_neg[j_neg].idx] == -1) j_neg--;
        d = vy_neg[j_neg];
      }
    }
    px -= 2 * d.dx;
    py -= 2 * d.dy;
    ans[d.idx] = -1;
  }
  for (int i = 0; i < n; i++) printf("%d%c", ans[i], " \n"[i == n - 1]);
}