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.io.InputStream;
import java.util.Arrays;
import java.util.InputMismatchException;
public class C159 {

	public static void main(String[] args) {
		FastScanner in = new FastScanner(System.in);
		int N = in.nextInt();
		Pair[] points = new Pair[N];
		for(int i = 0; i < N; i++) {
			points[i] = new Pair(in.nextInt(), in.nextInt());
		}
		
		Arrays.sort(points);
	/*	for(int i = 0; i < N; i++) {
			System.out.println("points[" + i + "] = " + points[i]);
		} */
		
		double max = 0;
		for(int i = 0; i < N; i++) {
			double next = points[(i+1) % N].angle;
			double curr = points[i].angle;
			double temp = next - curr;
			if(temp < 0) {
				temp += 360;
			}
			max = Math.max(temp, max);
		}
		
		double ans = 360 - max;
		if(ans >= 360)
			ans -= 360;
		
		System.out.println(ans);
		
	}
	
	static class Pair implements Comparable<Pair> {
		int a;
		int b;
		double angle;

		public Pair(int x, int y) {
			a = x;
			b = y;
			
			if(x == 0 && y == 0) {
				angle = 0;
			}
			else if(x >= 0 && y == 0) {
				angle = 0;
			}
			else if(x < 0 && y == 0) {
				angle = 180;
			}
			else if(x == 0 && y > 0) {
				angle = 90;
			}
			else if(x == 0 && y < 0) {
				angle = 270;
			}
			else if(x > 0 && y > 0){
				angle = Math.toDegrees(Math.atan(y/(double) (x)));
			}
			else if(x < 0 && y > 0) {
				angle = 180 + Math.toDegrees(Math.atan(y/(double) (x)));
			}
			else if(x < 0 && y < 0) {
				angle = 180 + Math.toDegrees(Math.atan(y/(double) (x)));
			}
			else {
				angle = 360 + Math.toDegrees(Math.atan(y/(double) (x)));
			}
			
			
			
		}

		public int compareTo(Pair p2) {
			double result = angle - p2.angle;
			if(result < 0) {
				return -1;
			}
			if(result > 0) {
				return 1;
			}
			return 0;
		}

		public boolean equals(Object o) {
			if (!(o instanceof Pair))
				return false;
			Pair p2 = (Pair) o;
			return (a == p2.a && b == p2.b);
		}

		public int hashCode() {
			return (a + " " + b).hashCode();
		}

		public String toString() {
			return "(" + a + ", " + b + ")";
		}
	}

	/**
	 * Source: Matt Fontaine
	 */
	static class FastScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int chars;

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

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

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

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

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

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

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

		public String next() {
			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 String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}
	}
	
}
/*
2
2 0
0 2
outputCopy
90.0000000000
inputCopy
3
2 0
0 2
-2 2
outputCopy
135.0000000000
inputCopy
4
2 0
0 2
-2 0
0 -2
outputCopy
270.0000000000
inputCopy
2
2 1
1 2
outputCopy
36.8698976458
*/