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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
double pi = acos(-1);
struct point {
  int x, y;
};
long long cross(point x, point y) { return x.x * y.y - x.y * y.x; }
long long dot(point x, point y) { return x.x * y.x + x.y * y.y; }
double nor(point a) {
  double ans = dot(a, a);
  return sqrt(ans);
}
bool ss(point a, point b) {
  int quad_a, quad_b;
  if (a.x > 0 && a.y == 0) quad_a = 1;
  if (a.x > 0 && a.y > 0) quad_a = 2;
  if (a.x == 0 && a.y > 0) quad_a = 3;
  if (a.x < 0 && a.y > 0) quad_a = 4;
  if (a.x < 0 && a.y == 0) quad_a = 5;
  if (a.x < 0 && a.y < 0) quad_a = 6;
  if (a.x == 0 && a.y < 0) quad_a = 7;
  if (a.x > 0 && a.y < 0) quad_a = 8;
  if (b.x > 0 && b.y == 0) quad_b = 1;
  if (b.x > 0 && b.y > 0) quad_b = 2;
  if (b.x == 0 && b.y > 0) quad_b = 3;
  if (b.x < 0 && b.y > 0) quad_b = 4;
  if (b.x < 0 && b.y == 0) quad_b = 5;
  if (b.x < 0 && b.y < 0) quad_b = 6;
  if (b.x == 0 && b.y < 0) quad_b = 7;
  if (b.x > 0 && b.y < 0) quad_b = 8;
  if (quad_a == quad_b) {
    if (cross(a, b) != 0)
      return !(cross(a, b) < 0);
    else
      return 0;
  } else
    return quad_a < quad_b;
}
int main() {
  vector<point> v;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    point u;
    cin >> u.x >> u.y;
    v.push_back(u);
  }
  sort(v.begin(), v.end(), ss);
  double ans = 0;
  point a = v[0], b = v[v.size() - 1];
  if (v.size() == 1) {
    ans = 0;
    cout << fixed << setprecision(8) << ans << endl;
  } else if (v.size() == 2) {
    if (cross(a, b) == 0 && dot(a, b) < 0)
      ans = 180;
    else if (cross(a, b) == 0 && dot(a, b) > 0)
      ans = 0;
    else
      ans = 180 / pi * acos(dot(a, b) / nor(a) / nor(b));
    cout << fixed << setprecision(8) << ans << endl;
  } else {
    double final = 1e9;
    for (int i = 0; i < v.size(); i++) {
      b = v[(i + 1) % (v.size())];
      a = v[i];
      ans = 180 / pi * asin(cross(a, b) / nor(a) / nor(b));
      ans = abs(ans);
      if (cross(a, b) > 0 && dot(a, b) < 0)
        ans = 180 - ans;
      else if (cross(a, b) < 0 && dot(a, b) < 0)
        ans = 180 + ans;
      else if (cross(a, b) < 0 && dot(a, b) > 0)
        ans = 360 - ans;
      else if (cross(a, b) == 0 && dot(a, b) > 0)
        ans = 0;
      else if (cross(a, b) > 0 && dot(a, b) == 0)
        ans = 90;
      else if (cross(a, b) == 0 && dot(a, b) < 0)
        ans = 180;
      else if (cross(a, b) < 0 && dot(a, b) == 0)
        ans = 270;
      ans = 360 - ans;
      final = min(final, ans);
    }
    if (abs(final - 360) <= 1e-11) final = 0;
    cout << fixed << setprecision(8) << final << endl;
  }
}