Problem: Flatland has recently introduced a new type of an eye check for the driver's licence. The check goes like that: there is a plane with mannequins standing on it. You should tell the value of the minimum angle with the vertex at the origin of coordinates and with all mannequins standing inside or on the boarder of this angle. 

As you spend lots of time "glued to the screen", your vision is impaired. So you have to write a program that will pass the check for you.

Input

The first line contains a single integer n (1 ≤ n ≤ 105) — the number of mannequins.

Next n lines contain two space-separated integers each: xi, yi (|xi|, |yi| ≤ 1000) — the coordinates of the i-th mannequin. It is guaranteed that the origin of the coordinates has no mannequin. It is guaranteed that no two mannequins are located in the same point on the plane.

Output

Print a single real number — the value of the sought angle in degrees. The answer will be considered valid if the relative or absolute error doesn't exceed 10 - 6. 

Examples

Input

2
2 0
0 2


Output

90.0000000000


Input

3
2 0
0 2
-2 2


Output

135.0000000000


Input

4
2 0
0 2
-2 0
0 -2


Output

270.0000000000


Input

2
2 1
1 2


Output

36.8698976458

Note

Solution for the first sample test is shown below: 

<image>

Solution for the second sample test is shown below: 

<image>

Solution for the third sample test is shown below: 

<image>

Solution for the fourth sample test is shown below: 

<image>

Solution (in JAVA):

Solution:

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        Point[] data = new Point[n];
        for (int i = 0; i < n; i++) {
            data[i] = new Point(in.nextInt(), in.nextInt());
        }
        Arrays.sort(data);
        //   System.out.println(cross(new Point(2,2), new Point(2,1)));
        double max = 0;
        for (int i = 0; i < n; i++) {
            int j = (i + 1) % n;
         //   System.out.println(data[i] + "^" + data[j]);
            double a = angle(data[j], data[i]);
            max = Math.max(a, max);
         //   System.out.println(a);
        }
        if (max != 0) {
            out.println(360 - max);
        } else {
            out.println(0);
        }
        out.close();
    }

    public static int quarter(Point a) {
        if (a.x >= 0 && a.y >= 0) {
            return 0;
        } else if (a.x >= 0 && a.y <= 0) {
            return 1;
        } else if (a.x <= 0 && a.y <= 0) {
            return 2;
        } else {
            return 3;
        }
    }

    public static double angle(Point a, Point b) {

//            return 0;
//        }      
        // long val = (a.x * b.x) + (a.y * b.y);

       // double lB = b.x * b.x + b.y * b.y;

        double result = Math.atan2(b.y, b.x) - Math.atan2(a.y, a.x);
        result = Math.toDegrees(result);
        if (result < 0) {
            result += 360;
        }
        return Math.abs(result);

    }

    public static long cross(Point a, Point b) {
        long val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        long x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public String toString() {
            return x + " " + y;
        }

        @Override
        public int compareTo(Point o) {
            int c = quarter(this);
            int d = quarter(o);
            if (c != d) {
                return c - d;
            }
            long a = cross(this, o);
            //   System.out.println(a);
            if (a < 0) {
                return -1;
            } else if (a > 0) {
                return 1;
            } else {
                return 0;

            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}