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;
long long inp;
long long i1, i2, i3, i4, i5, i6, i7, i8;
long long mov = (long long)1e9 + 7;
using Point = complex<double>;
const double kPi = 4.0 * atan(1.0);
const double kEps = 1e-9;
double dot(Point a, Point b) { return (conj(a) * b).real(); }
double cross(Point a, Point b) { return (conj(a) * b).imag(); }
double dist(Point a, Point b) { return abs(b - a); }
Point perp(Point a) { return Point{-a.imag(), a.real()}; }
template <class P>
int segmentIntersection(const P& s1, const P& e1, const P& s2, const P& e2,
                        P& r1, P& r2) {
  if (e1 == s1) {
    if (e2 == s2) {
      if (e1 == e2) {
        r1 = e1;
        return 1;
      } else
        return 0;
    } else
      return segmentIntersection(s2, e2, s1, e1, r1, r2);
  }
  P v1 = e1 - s1, v2 = e2 - s2, d = s2 - s1;
  auto a = cross(v1, v2), a1 = cross(v1, d), a2 = cross(v2, d);
  if (a == 0) {
    auto b1 = dot(s1, v1), c1 = dot(e1, v1), b2 = dot(s2, v1), c2 = dot(e2, v1);
    if (a1 || a2 || max(b1, min(b2, c2)) > min(c1, max(b2, c2))) return 0;
    r1 = min(b2, c2) < b1 ? s1 : (b2 < c2 ? s2 : e2);
    r2 = max(b2, c2) > c1 ? e1 : (b2 > c2 ? s2 : e2);
    return 2 - (r1 == r2);
  }
  if (a < 0) {
    a = -a;
    a1 = -a1;
    a2 = -a2;
  }
  if (0 < a1 || a < -a1 || 0 < a2 || a < -a2) return 0;
  r1 = s1 - v1 * a2 / a;
  return 1;
}
double eval(vector<long long> a, vector<long long> b, vector<long long> c) {
  double dotp = 0;
  for (int i = (0); i < (5); i++) {
    dotp += ((double)b.at(i) - a.at(i)) * ((double)c.at(i) - a.at(i));
  }
  double abv = 0;
  double usqt = 0;
  for (int i = (0); i < (5); i++) {
    usqt += ((double)b.at(i) - a.at(i)) * ((double)b.at(i) - a.at(i));
  }
  abv += (double)sqrt(usqt);
  usqt = 0;
  for (int i = (0); i < (5); i++) {
    usqt += ((double)c.at(i) - a.at(i)) * ((double)c.at(i) - a.at(i));
  }
  abv *= (double)sqrt(usqt);
  return (acos(dotp / abv));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  long long n;
  cin >> n;
  vector<pair<double, double>> coor;
  vector<double> angle;
  double xi, yi;
  for (int i = (0); i < (n); i++) {
    cin >> xi >> yi;
    if (xi > 0) {
      angle.push_back(180.0 / 3.1415926535897932384626 *
                      asin(yi / (double)sqrt(xi * xi + yi * yi)));
    } else {
      angle.push_back(180.0 + 180.0 / 3.1415926535897932384626 *
                                  asin(-yi / (double)sqrt(xi * xi + yi * yi)));
    }
  }
  sort(angle.begin(), angle.end());
  double r = 0;
  for (int i = (1); i < (n); i++) {
    r = max(r, angle.at(i) - angle.at(i - 1));
  }
  r = max(r, angle.at(0) - angle.at(n - 1) + 360.0);
  cout << 360.0 - r;
  return 0;
}