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.*;
import java.util.*;
public class Main {
    public static void main(String[] args) throws IOException {
        new PracB().run();
    }
}
class PracA {
    public void run() throws IOException {
        Input in = new Input();
        Output out = new Output();
        int xa = in.nextInt(), ya = in.nextInt();
        int xb = in.nextInt(), yb = in.nextInt();
        int xc = in.nextInt(), yc = in.nextInt();
        Point a = new Point(xa, ya);
        Point b = new Point(xb, yb);
        Point c = new Point(xc, yc);
        int orient = Point.orient(a, b, c);
        if(orient == -1) {
            out.println("RIGHT");
        } else if(orient == 0) {
            out.println("TOWARDS");
        } else out.println("LEFT");
        out.flush();
    }
}
class PracB {
    public void run() throws IOException {
        Input in = new Input();
        Output out = new Output();
        int n = in.nextInt();
        Point orig = new Point(1, 0);
        double[] angles = new double[n];
        for(int i = 0; i < n; i++) {
            Point p = new Point(in.nextInt(), in.nextInt());
            double angle = (Point.deg(Point.angle(orig, p)));
            angles[i] = angle;
        }
        Arrays.sort(angles);
        double min = angles[n-1] - angles[0];
        for(int i = 0; i < n - 1; i++) {
            min = Math.min(min, 360.0 - angles[i + 1] + angles[i]);
        }
        System.out.println(min);
    }
}
class Point {
    double x, y;
    public Point(double x, double y){
        this.x = x;
        this.y = y;
    }
    public double mag() {
        return Math.sqrt(x * x + y * y);
    }
    public Point normalize() {
        double len = this.mag();
        return new Point(x / len, y / len);
    }
    public boolean onSegment(Point p, Point r){
        double epsilon = 0.00000001;
        double a = Math.abs(distance(p, this) + distance(this, r));
        double b = distance(p, r);
        return (a + b - distance(p, r) < epsilon);
    }
    public static double distance(Point a, Point b){
        return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2));
    }
    public static Point add(Point a, Point b) {
        return new Point(a.x + b.x, a.y + b.y);
    }
    public static Point sub(Point a, Point b) {
        return new Point(a.x - b.x, a.y - b.y);
    }
    public static double dot(Point a, Point b) {
        return a.x * b.x + a.y * b.y;
    }
    public static double cross(Point a, Point b) {
        return a.x * b.y - a.y * b.x;
    }
    public static double angle(Point a, Point b) {
        return Math.atan2(b.y, b.x) - Math.atan2(a.y, a.x);
    }
    public static int orient(Point a, Point b, Point c) {
        double x = cross(sub(b, a), sub(c, b));
        double eps = 1e-8;
        if(x > eps) return 1;
        else if(x < -eps) return -1;
        else return 0;
    }
    public static double rad(double deg) {
        return deg * Math.PI / 180.0;
    }
    public static double deg(double rad) {
        return 180.0 * rad / Math.PI;
    }
}
class Input {
    InputStreamReader r;
    BufferedReader br;
    StringTokenizer st;
    public Input() throws IOException{
        r = new InputStreamReader(System.in);
        br = new BufferedReader(r);
        st = new StringTokenizer(br.readLine());
    }
    public Input(InputStream i) throws IOException{
        r = new InputStreamReader(i);
        br = new BufferedReader(r);
        st = new StringTokenizer(br.readLine());
    }
    public String nextToken() throws IOException{
        if(st.hasMoreTokens()){
            return st.nextToken();
        }
        st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }
    public String nextToken(String delim) throws IOException{
        if(st.hasMoreTokens()){
            return st.nextToken(delim);
        }
        st = new StringTokenizer(br.readLine());
        return st.nextToken(delim);
    }
    public String nextLine() throws IOException{
        if(st.hasMoreTokens()){
            return st.nextToken("\n");
        }
        st = new StringTokenizer(br.readLine());
        return st.nextToken("\n");
    }
    public int nextInt() throws IOException{
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException{
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
    public String[] nextLineSplit(String s) throws IOException{
        return nextLine().split(s);
    }
    public boolean hasMoreTokens(){
        return st.hasMoreTokens();
    }
}
class Output {
    OutputStream out;
    public Output() { out = new BufferedOutputStream(System.out); }
    public void println(String s) throws IOException {
        out.write((s + "\n").getBytes());
    }
    public void print(String s) throws IOException {
        out.write((s).getBytes());
    }
    public void println(int i) throws IOException { println(i + ""); }
    public void flush() throws IOException {
        out.flush();
    }
}