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 ≤ 10^5) — the number of mannequins.

Next n lines contain two space-separated integers each: x_{i}, y_{i} (|x_{i}|, |y_{i}| ≤ 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:  $\#$

Difficulty: interview

Starter code:

Solutions:
3

import math

n = int(input())
points = [tuple(map(int, input().split())) for _ in range(n)]
angles = sorted([math.atan2(x, y) for x, y in points])
angles.append(angles[0] + 2 * math.pi)
max_angle = max([abs(a - b) for a, b in zip(angles[:-1], angles[1:])] + [])
print('%0.9f' % (180 * (2 * math.pi - max_angle) / math.pi))


from math import atan2, pi
n = int(input())
a = [map(int, input().split()) for i in range(n)]
a = sorted(atan2(y, x) for x, y in a)
d = [a[i + 1] - a[i] for i in range(n - 1)]
d.append(2 * pi - a[n - 1] + a[0])
print(360 - 180 * max(d) / pi)

import math
def Q(x,y):
    if(x==0):
        if(y>0):
            return math.pi/2
        if(y<0):
            return (math.pi/2)*3
    #y=mx
    m=abs(y/x)
    theta=math.atan(m)
    if(y>=0 and x>=0):
        return theta
    if(y>=0 and x<=0):
        return math.pi-theta
    if(y<=0 and x<=0):
        return math.pi+theta
    else:
        return 2*math.pi-theta
    

n=int(input())
P=[]
for i in range(n):
    x,y=list(map(int,input().split()))
    P.append(Q(x,y))

P.sort()
ans=360
for i in range(1,n):
    ans=min(ans,(math.pi*2)-(P[i]-P[i-1]))
ans=min(ans,P[n-1]-P[0])
print((ans*360)/(2*math.pi))


t = []
from math import pi
from math import atan

def f(x,y):
    if y == 0:
        if x>0:
            return 0
        else:
            return pi

    if x == 0:
        if y>0:
            return pi/2
        else:
            return 3*pi/2

    if x > 0 and y > 0:
        return atan(y/x)

    if x < 0 and y < 0:
        return pi + atan(y/x)

    if x > 0 and y < 0:
        return 2*pi+atan(y/x)

    if x < 0 and y > 0:
        return pi+atan(y/x)

def g(x,y):
    return 180*f(x,y)/pi


for i in range(int(input())):
    x, y = list(map(int, input().split(' ')))
    
    t.append(g(x,y))

t.sort()

m = t[-1] - t[0]
for i in range(1, len(t)):
    m = min(m, 360 - (t[i]-t[i-1]))
print(m)

#!/usr/bin/env python3

from sys import stdin
from math import atan2, pi, degrees

def main():
    num_points = int(stdin.readline())
    angles = []

    for point in range(num_points):
        x, y = list(map(int, stdin.readline().split()))
        angles.append(atan2_deg(y, x))

    # calculate best angle
    angles = sorted(angles)
    best = abs(angles[-1] - angles[0])
    for i in range(1, num_points):
        best = min(best, 360.0 - abs(angles[i] - angles[i - 1]))
    print(best)

def atan2_deg(y, x):
    return degrees(atan2(y, x) + pi)

def __starting_point():
    main()

__starting_point()

from sys import stdin
import math

N = int(stdin.readline())

angles = []

for n in range(N):
    x, y = list(map(int, stdin.readline().split()))

    angles.append((math.atan2(y, x) + 2 * math.pi) % (2 * math.pi))

angles.sort()
angles.append(angles[0] + 2 * math.pi)

max_gap = max(angles[i] - angles[i - 1] for i in range(1, len(angles)))
print(360 - 180 * max_gap / math.pi)


from math import *
n = int(input())
pts = [ list(map(float,input().split())) for _ in range(n) ]
a = sorted([ atan2(y,x) for x,y in pts])
d = [ a[i]-a[i-1] for i in range(1,len(a)) ]
d.append( 2*pi+a[0]-a[-1] )
print(degrees(2*pi-max(d)))


#   C:\Users\Usuario\HOME2\Programacion\ACM


from math import atan2, pi

def solve():
    n = int(input().rstrip())
    angles = []
    for _ in range(n):
        a, b = list(map(int, input().rstrip().split()))
        angles.append(atan2(b, a))
    angles.sort()
    maxangle = 2 * pi - (angles[n - 1] - angles[0])
    for i in range(n - 1):
        maxangle = max(angles[i + 1] - angles[i], maxangle)
    return 360 - maxangle * 180 / pi

def __starting_point():
    print(solve())

__starting_point()

import math
from math import atan2 as t
a=[]
for i in range(int(input())):
  x,y=map(int,input().split())
  a.append(180*t(y,x)/math.pi)
a.sort()
ans=a[-1]-a[0]
for i in range(len(a)-1):
  ans=min(ans,360-a[i+1]+a[i])
print(ans)

import math

N = int(input())
angles = []
for _ in range(N):
  x, y = map(int, input().split())
  angles.append(math.atan2(y, x))
  
angles.sort()

max_angle = 0

for i in range(N):
  angle = abs(angles[i] - angles[(i+1)%N])
  if i == N-1:
    angle = 2*math.pi - angle
  max_angle = max(max_angle, angle)
  
print(360.0 - (max_angle * 180) / math.pi)

from math import pi, atan2

numMannequins = int(input())

coordinates = []
for i in range(numMannequins):
    coordinates.append(map(int, input().split()))

coordinates = sorted(atan2(y, x) for x, y in coordinates)

distance = [(coordinates[i + 1] - coordinates[i]) for i in range(numMannequins - 1)]
distance.append(2 * pi - coordinates[numMannequins - 1] + coordinates[0])

print(360 - (180 * (max(distance) / pi)))

import math

out = []

for i in range(int(input())):
    x, y = map(int,input().split())
    out.append(180 * (math.atan2(y,x) / math.pi))
    
out.sort()

res = out[-1] - out[0]

for i in range(len(out)-1):
    res = min(res, 360 - out[i+1] + out[i])
    
print(res)

def main():
    from sys import stdin, stdout
    from math import atan2, pi
    n = int(stdin.readline().strip())
    angles = []
    for i in range(n):
        (x, y) = list(map(float, stdin.readline().strip().split(' ')))
        angles.append((atan2(y, x) * 180 / pi) % 360)
    angles = sorted(angles)
    m = 0
    for i in range(n - 1):
        m = max(m, angles[i + 1] - angles[i])
    m = max(m, (angles[0] - angles[-1]) % 360)
    stdout.write('{:.15f}\n'.format((360 - m) % 360))
main()



from sys import stdin
import functools
import math

def read(): return list(map(int, stdin.readline().split()))

n, = read()
a = [ ]
for i in range(n):
  x,y = read()
  a.append ( math.atan2(y,x)%(2*math.pi) )
a = sorted(a)

if abs(a[0]-a[-1]) < 1e-9:
  print( 0 )
  return

ans = 0
for i in range(n):
  ans = max ( ans, a[i]-a[i-1] )
ans = max ( ans, 2*math.pi - (a[-1] - a[0]) )

print(360.0 - ans/math.pi*180.0)


from sys import stdin
import math

N = int(stdin.readline())

a = []

for n in range(N):
    x, y = map(int, stdin.readline().split())

    a.append((math.atan2(y, x) + 2 * math.pi) % (2 * math.pi))

a.sort()
a.append(a[0] + 2 * math.pi)

max_gap = max(a[i] - a[i - 1] for i in range(1, len(a)))
print(360 - 180 * max_gap / math.pi)

from math import atan2, degrees, pi

def main():
	num_man = int(input())
	angles = []
	for n in range(num_man):
		x, y = input().strip().split(' ')
		x, y = int(x), int(y)
		angles.append(atan2(y, x))
	angles.sort()
	max_diff = 0
	for i in range(len(angles) - 1):
		max_diff = max(max_diff, angles[i + 1] - angles[i])
	diff = angles[0] - angles[num_man - 1]
	if diff < 1e-7:
		diff += 360 * pi / 180
	max_diff = max(max_diff, diff)
	res = 360 - (max_diff * 180 / pi)
	print(res)

main()

from sys import stdin
import math

N = int(stdin.readline())

a = []

for n in range(N):
    x, y = map(int, stdin.readline().split())

    a.append((math.atan2(y, x) + 2 * math.pi) % (2 * math.pi))

a.sort()
a.append(a[0] + 2 * math.pi)

max_gap = max(a[i] - a[i - 1] for i in range(1, len(a)))
print(360 - 180 * max_gap / math.pi)

from math import atan2, pi

n = int(input())

a = [list(map(int, input().split())) for i in range(n)]

a = sorted(atan2(y, x) for x, y in a)

d = [a[i + 1] - a[i] for i in range(n - 1)]

d.append(2 * pi - a[n - 1] + a[0])

print(360 - 180 * max(d) / pi)



# Made By Mostafa_Khaled


from math import atan2, pi
n = int(input())
a = [map(int, input().split()) for i in range(n)]
a = sorted(atan2(y, x) for x, y in a)
d = [a[i + 1] - a[i] for i in range(n - 1)]
d.append(2 * pi - a[n - 1] + a[0])
print(360 - 180 * max(d) / pi)

from sys import stdin
import math

N = int(stdin.readline())

angles = []

for n in range(N):
    x, y = map(int, stdin.readline().split())

    angles.append((math.atan2(y, x) + 2 * math.pi) % (2 * math.pi))

angles.sort()
angles.append(angles[0] + 2 * math.pi)

max_gap = max(angles[i] - angles[i - 1] for i in range(1, len(angles)))
print(360 - 180 * max_gap / math.pi)

import sys, math

n = int(sys.stdin.readline())
points = []
for i in range(n):
    [a, b] = list(map(int, sys.stdin.readline().split()))
    points.append(math.atan2(a,b))
points = sorted(points)
diffs = []
for i in range(n):
    if (i == n-1):
        diffs.append(points[0]-points[n-1] + 2 * math.pi)
    else:
        diffs.append(points[i+1]-points[i])
print(360-180*max(diffs)/math.pi)

import math

N = int(input())
angles = []
for _ in range(N):
  x, y = map(int, input().split())
  angles.append(math.atan2(y, x))
  
angles.sort()

max_angle = 0

for i in range(N):
  angle = abs(angles[i] - angles[(i+1)%N])
  if i == N-1:
    angle = 2*math.pi - angle
  max_angle = max(max_angle, angle)
  
print(360.0 - (max_angle * 180) / math.pi)

import math

n = int(input())

coors = [[int(item) for item in input().split(' ')] for i in range(n)]


def get_pos(item):
    (x, y) = item

    deg = math.degrees(math.atan(abs(math.inf if x == 0 else y / x)))

    if y < 0:
        if x >= 0:
            return 360 - deg
        else:
            return 180 + deg
    else:
        if x >= 0:
            return deg
        else:
            return 180 - deg


angles = [get_pos(item) for item in coors]

angles.sort()

t = [angles[0] + 360 - angles[-1]]

for i in range(1, n):
    t.append(angles[i] - angles[i - 1])

print(360 - max(t))