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:
/*
 * Code Author: Akshay Miterani
 * DA-IICT
 */
import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;

public class MainA {

	static double eps=(double)1e-6;
	static long mod=(long)1e9+7;
	static final long INF = Long.MAX_VALUE / 100;
	public static void main(String args[]) throws FileNotFoundException{
		InputReader in = new InputReader(System.in);
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		//----------------My Code------------------
		int n=in.nextInt();
		double x[]=new double[n];
		double y[]=new double[n];
		ArrayList<Point> p=new ArrayList<>();
		for(int i=0;i<n;i++){
			x[i]=in.nextInt();
			y[i]=in.nextInt();
			if(x[i]==0 && y[i]==0){
				
			}
			else{
				p.add(new Point(x[i], y[i]));
			}
		}
		Collections.sort(p);
		double ans=0;
		if(p.size()==1){
			System.out.printf("%.10f\n",ans);
			return;
		}
		for(int i=0;i<n;i++){
			//System.out.println(angle(p[i]));
			double d=angle(p.get(i))-angle(p.get((i+1)%n));
			if(d<0)
				d+=360;
			ans=Math.max(ans, d);
		}
		if(ans==0)
			ans=360;
		out.printf("%.10f\n",360-ans);
		out.close();
		//----------------The End------------------

	}
	public static double angle(Point p){
		return Math.toDegrees(Math.atan2(p.y, p.x));
	}
	public static class Point implements Comparable<Point> {
		public double x, y;

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

		public Point minus(Point b) {
			return new Point(x - b.x, y - b.y);
		}

		public double cross(Point b) {
			return x * b.y - y * b.x;
		}

		public double dot(Point b) {
			return x * b.x + y * b.y;
		}

		public Point rotateCCW(double angle) {
			return new Point(x * Math.cos(angle) - y * Math.sin(angle), x * Math.sin(angle) + y * Math.cos(angle));
		}

		@Override
		public int compareTo(Point o) {
			// return Double.compare(Math.atan2(y, x), Math.atan2(o.y, o.x));
			return Double.compare(angle(o), angle(this));
		}
	}
	public static double angleBetween(Point a, Point b) {
		return Math.atan2(a.cross(b), a.dot(b));
	}
	static class Pair implements Comparable<Pair>{
		int x;
		int y;

		Pair(int xx,int yy){
			x=xx;
			y=yy;
		}
		@Override
		public int compareTo(Pair o) {
			if(Long.compare(this.x, o.x)!=0)
				return Long.compare(this.x, o.x);
			else
				return Long.compare(this.y, o.y);
		}
	}
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputstream) {
			reader = new BufferedReader(new InputStreamReader(inputstream));
			tokenizer = null;
		}

		public String nextLine(){
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}