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.awt.geom.Point2D;
import java.util.*;
import java.io.*;
import java.math.*;
import java.util.regex.*;

public class Main {
       
    static InputReader in;
    
    public static void main(String[] args) throws IOException{        
        
        File file = new File("input.txt");
        if(file.exists())in = new InputReader( new FileInputStream(file) );
        else in = new InputReader( System.in );
        
        int n=in.nextInt();
        double angle[]=new double[n];
        int xi, yi;
        for( int i=0; i<n; i++ ) {
            xi=in.nextInt();
            yi=in.nextInt();
            angle[i]=Math.toDegrees( Math.atan2( yi, xi ) );
            if( angle[i]<0 ) angle[i]+=360;
        }
        Arrays.sort( angle );
        double ans=1e99;
        for( int i=0; i<n-1; i++ ) 
            ans=Math.min( ans, 360-(angle[(i+1)%n]-angle[i]) );
        
        ans=Math.min( ans ,  360-(angle[0]+360-angle[n-1]) );
                
        System.out.printf( Locale.US, "%.10f\n" , ans );
    } 
    
    
    // IO utilities:
    
    static void out(Object ...o){ 
        System.out.println(Arrays.deepToString(o)); 
    } 
    
    static class InputReader {
        
        private BufferedInputStream inp;
	private int offset;
	private final int size=5120000;
        private byte buff[];
 
        InputReader( InputStream in ) throws IOException {
		inp = new BufferedInputStream( in );
                buff=new byte[size];
                offset=0;
		inp.read( buff, 0, size );
	}
 
	int nextInt() throws IOException {
            
            int parsedInt=0, by=1;
            int i=offset;
            if( buff[i]==0 ) throw new IOException(); //EOF
            // skip any non digits
            while ( i<size && ( (buff[i]<'0' || buff[i]>'9') && buff[i]!='-' ) ) i++;
            // read digits and parse number
            if( i<size && buff[i]=='-' ) {
                by=-1;
                i++;
            }
            while( i<size && buff[i]>='0' && buff[i]<='9') {
                parsedInt*=10;
                parsedInt+=buff[i]-'0';
                i++;
            }
            // check if we reached end of buffer
            if ( i==size ) {
                // copy leftovers to buffer start
		int j = 0;
		for ( ; offset<buff.length; j++, offset++ ) 
                        buff[j] = buff[offset];
		// and now fill the buffer
		inp.read( buff, j, size - j );
		// and attempt to parse int again
		offset = 0;
		parsedInt = nextInt();
            } else offset=i;
            return parsedInt*by;
	}
        
        long nextLong() throws IOException{
            
            long parsedLong=0, by=1;
            int i=offset;
            if( buff[i]==0 ) throw new IOException(); //EOF
            // skip any non digits
            while ( i<size && ( (buff[i]<'0' || buff[i]>'9') && buff[i]!='-' ) ) i++;
            // read digits and parse number
            if( i<size && buff[i]=='-' ) {
                by=-1;
                i++;
            }
            while( i<size && buff[i]>='0' && buff[i]<='9') {
                parsedLong*=10L;
                parsedLong+=buff[i]-'0';
                i++;
            }
            // check if we reached end of buffer
            if ( i==size ) {
                // copy leftovers to buffer start
		int j = 0;
		for ( ; offset<buff.length; j++, offset++ ) 
                        buff[j] = buff[offset];
		// and now fill the buffer
		inp.read( buff, j, size - j );
		// and attempt to parse int again
		offset = 0;
		parsedLong = nextLong();
            } else offset=i;
            return parsedLong*by;
        }
        
        String next() throws IOException {
            
            StringBuilder token=new StringBuilder();
            int i=offset;
            if( buff[i]==0 ) throw new IOException(); //EOF
            // skip any non chars
            while( i<size && ( buff[i]=='\n' || buff[i]==' ' || buff[i]=='\r' ||
                    buff[i]=='\t' ) ) i++;
            // read chars
            while( i<size && buff[i]!='\n' && buff[i]!=' ' && buff[i]!='\r' &&
                    buff[i]!='\t' && buff[i]!=0 ) {
                token.append( (char)buff[i] );
                i++;
            }
            // check if we reached end of buffer
            if ( i==size ) {
                // copy leftovers to buffer start
		int j = 0;
		for ( ; offset<buff.length; j++, offset++ ) 
                        buff[j] = buff[offset];
		// and now fill the buffer
		inp.read( buff, j, size - j );
		// and attempt to parse int again
		offset = 0;
		return next();
            } else offset=i;
            return token.toString();
        }
        
        String nextLine() throws IOException {
            
            StringBuilder line=new StringBuilder();
            int i=offset;
            if( buff[i]==0 ) throw new IOException(); //EOF
            // read chars
            while( i<size && buff[i]!='\n' && buff[i]!=0 ) {
                line.append( (char)buff[i] );
                i++;
            }
            if( i<size && buff[i]=='\n' ) i++;
            // check if we reached end of buffer
            if ( i==size ) {
                // copy leftovers to buffer start
		int j = 0;
		for ( ; offset<buff.length; j++, offset++ ) 
                        buff[j] = buff[offset];
		// and now fill the buffer
		inp.read( buff, j, size - j );
		// and attempt to parse int again
		offset = 0;
		return nextLine();
            } else offset=i;
            line.deleteCharAt( line.length()-1 );
            return line.toString();
        }
        
    }
}