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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.Comparator;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author -----_--_||||-__-
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            double det = 1.5 * 1000000;
            double x = 0, y = 0;
            fourpair[] dinchak = new fourpair[n];
            int[] ans = new int[n];
            for (int i = 0; i < n; i++) {
                long xx, yy;
                xx = in.nextLong();
                yy = in.nextLong();
                double ex = Math.sqrt(xx * xx + yy * yy);
                dinchak[i] = new fourpair(ex, i, xx, yy);

            }
            Arrays.sort(dinchak, new Comparator<fourpair>() {

                public int compare(fourpair o1, fourpair o2) {
                    if (o1.ex > o2.ex)
                        return 1;
                    else if (o1.ex < o2.ex)
                        return -1;
                    else
                        return 0;
                    //return (int) (o1.ex-o2.ex);
                }
            });
            //   for(int i=0;i<n;i++)
            //     out.println(dinchak[i].ex+" "+dinchak[i].id);
            for (int i = n - 1; i >= 0; i--) {

                //       out.println(dinchak[i].ex+" "+dinchak[i].id);
                double xx = dinchak[i].x;
                double yy = dinchak[i].y;
                // out.println(x+" "+xx+" "+y+" "+yy);

                double aa = x - xx;
                double bb = y - yy;
                xx += x;
                yy += y;
                double dhamal = Math.sqrt((xx * xx + yy * yy));
                double disco = Math.sqrt((aa * aa + bb * bb));
                //    out.println(dhamal);
                //  out.println(disco);
                //  out.println(aa+" "+bb);

                if (dhamal <= disco) {
                    ans[dinchak[i].id] = 1;
                    x = xx;
                    y = yy;
                } else {
                    x = aa;
                    y = bb;
                    ans[dinchak[i].id] = -1;
                }
            }
            if (Math.sqrt(x * x + y * y) > det) {
                x = 0;
                y = 0;
                for (int i = 0; i < n; i++) {
                    //  out.println(dinchak[i].ex+" "+dinchak[i].id);
                    double xx = dinchak[i].x;
                    double yy = dinchak[i].y;


                    double aa = x - xx;
                    double bb = y - yy;
                    xx += x;
                    yy += y;
                    double dhamal = Math.sqrt((xx * xx + yy * yy));
                    double disco = Math.sqrt((aa * aa + bb * bb));
                    //    out.println(dhamal);
                    //  out.println(disco);
                    // out.println(xx+" "+yy+" "+aa+" "+bb);
                    if (dhamal <= disco) {
                        ans[dinchak[i].id] = 1;
                        x = xx;
                        y = yy;
                    } else {
                        x = aa;
                        y = bb;
                        ans[dinchak[i].id] = -1;
                    }
                }
            }
            if (Math.sqrt(x * x + y * y) > det) {
                x = 0;
                y = 0;
                threepair[] bingo = new threepair[n];

                for (int i = 0; i < n; i++)
                    bingo[i] = new threepair(dinchak[i].id, dinchak[i].x, dinchak[i].y);
                Arrays.sort(bingo, new Comparator<threepair>() {

                    public int compare(threepair o1, threepair o2) {
                        if (o1.x > o2.x)
                            return 1;
                        else if (o1.x < o2.x)
                            return -1;
                        else
                            return 0;
                    }
                });
                for (int i = n - 1; i >= 0; i--) {
                    double xx = bingo[i].x;
                    double yy = bingo[i].y;

                    xx += x;
                    yy += y;
                    double aa = x - xx;
                    double bb = y - yy;
                    double dhamal = Math.sqrt((xx * xx + yy * yy));
                    double disco = Math.sqrt((aa * aa + bb * bb));
                    //  out.println(dhamal);
                    // out.println(disco);
                    if (dhamal <= disco) {
                        ans[bingo[i].id] = 1;
                        x = xx;
                        y = yy;
                    } else {
                        x = aa;
                        y = bb;
                        ans[bingo[i].id] = -1;
                    }
                }
            }
            if (Math.sqrt(x * x + y * y) > det) {
                x = 0;
                y = 0;
                threepair[] bingo = new threepair[n];

                for (int i = 0; i < n; i++)
                    bingo[i] = new threepair(dinchak[i].id, dinchak[i].x, dinchak[i].y);
                Arrays.sort(bingo, new Comparator<threepair>() {

                    public int compare(threepair o1, threepair o2) {
                        if (o1.y > o2.y)
                            return 1;
                        else if (o1.y < o2.y)
                            return -1;
                        else
                            return 0;
                    }
                });
                for (int i = n - 1; i >= 0; i--) {
                    double xx = bingo[i].x;
                    double yy = bingo[i].y;

                    xx += x;
                    yy += y;
                    double aa = x - xx;
                    double bb = y - yy;
                    double dhamal = Math.sqrt((xx * xx + yy * yy));
                    double disco = Math.sqrt((aa * aa + bb * bb));
                    //  out.println(dhamal);
                    // out.println(disco);
                    if (dhamal <= disco) {
                        ans[(int) dinchak[i].y] = 1;
                        x = xx;
                        y = yy;
                    } else {
                        x = aa;
                        y = bb;
                        ans[(int) dinchak[i].y] = -1;
                    }
                }
            }
            for (int i = 0; i < n; i++)
                out.print(ans[i] + " ");
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class threepair {
        int id;
        double x;
        double y;

        public threepair(int id, double x, double y) {

            this.id = id;
            this.x = x;
            this.y = y;
        }

    }

    static class fourpair {
        double ex;
        int id;
        double x;
        double y;

        public fourpair(double ex, int id, double x, double y) {
            this.ex = ex;
            this.id = id;
            this.x = x;
            this.y = y;
        }

    }
}