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.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Scanner;



public class ViewAngle159C 
{
     static FasterScanner s=new FasterScanner();
    public static void main(String args[])
    {
        //FasterScanner s=new FasterScanner();
        int n=s.nextInt();
        double m[]=new double[n];
        for(int i=0;i<n;i++)
        {
            int a=s.nextInt();
            int b=s.nextInt();
            
            if(a==0 && b>0)
                {
                m[i]=90;
                continue;
                }
            
            
            if(a==0 && b<0)
            {
            m[i]=270;
            continue;
            }
            
            if(b==0 && a>0)
            {
            m[i]=0;
            continue;
            }
            
            
            if(b==0 && a<0)
                m[i]=180;
            else
            m[i]=Math.toDegrees(Math.atan(((double)b)/(double)a));
            
                
                {if(a<0 && b>0)
                m[i]=180+(m[i]);
                else
                    if(a<0 && b<0)
                        m[i]=180+Math.abs(m[i]);
                    else
                        if(a>0 && b<0)
                            m[i]=360+m[i];
            
                }
                
                
            
        }
        
        if(n==1)
        {
            System.out.printf("0.000000");
            System.exit(0);
        }
        
        Arrays.sort(m);
        
        
        //System.out.println(m1);
        double min=Double.MAX_VALUE;
        double tmp=m[0];
        for(int i=0;i<n;i++)
        {
            if(m[n-i-1]==tmp)
            continue;
            if(Math.abs(m[n-i-1]-tmp)<min)
            {
                min=Math.abs(m[n-i-1]-tmp);
            }
            //System.out.println(min+" "+Math.abs(m[n-i-1]-tmp)+" "+m[n-i-1]+" "+tmp);
            tmp=(m[n-i-1]-360);
            
        }
        if(min==Double.MAX_VALUE)
            System.out.println("0.000000");
        else
        System.out.printf("%.6f",min);
        
    }


 static class FasterScanner {
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = System.in.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    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 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 int[] nextIntArray(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public long[] nextLongArray(int n) {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = nextLong();
        }
        return arr;
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }
 }
 }