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;
vector<vector<int> > AdjList;
class point {
 public:
  long double x, y;
  point() {
    x = 0.0;
    y = 0.0;
  };
  point(long double x, long double y) : x(x), y(y){};
  bool operator==(point other) const {
    return ((fabs(x - other.x) < 1e-12) && (fabs(y - other.y) < 1e-12));
  }
};
struct vec {
  long double x, y;
  vec(long double _x, long double _y) : x(_x), y(_y) {}
};
long double cross(vec a, vec b);
vec toVec(point a, point b) { return vec(b.x - a.x, b.y - a.y); }
struct cmp {
  point about;
  cmp(point c) { about = c; }
  bool operator()(point p, point q) {
    long double cr = cross(toVec(about, p), toVec(about, q));
    if (fabs(cr) < 1e-12) return make_pair(p.y, p.x) < make_pair(q.y, q.x);
    return cr > 0;
  }
};
long double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
bool ccw(point p, point q, point r) {
  return cross(toVec(p, q), toVec(p, r)) > 0;
}
long double DEG_to_RAD(long double r) { return r * acos(-1.0) / 180.0; }
long double RAD_to_DEG(long double r) { return r * 180.0 / acos(-1.0); }
void sortAnticc(vector<point> &pnts) {
  point mn(1 / 0.0, 1 / 0.0);
  for (int i = 0; i < pnts.size(); i++)
    if (make_pair(pnts[i].y, pnts[i].x) < make_pair(mn.y, mn.x)) mn = pnts[i];
  sort(pnts.begin(), pnts.end(), cmp(point(0, 0)));
}
long double dif(long double x, long double y) { return (x - y) * (x - y); }
long double dis(point p) { return sqrt(dif(p.x, 0.0) + dif(p.y, 0.0)); }
long double calcAng_oig(point a, point b) {
  long double hp = a.x * b.x + a.y * b.y;
  hp /= (dis(a) * dis(b));
  return RAD_to_DEG(acos(hp));
}
long double miniang(vector<point> &pnt) {
  long double mini = 360.0;
  for (int i = 0; i < pnt.size() - 1; i++) {
    int hp = (i + 1) % pnt.size();
    mini = min(mini, 360.0 - calcAng_oig(pnt[i], pnt[hp]));
  }
  mini = min(mini, calcAng_oig(pnt[pnt.size() - 1], pnt[0]));
  return mini;
}
long double angle[100005];
int main(int argc, char **argv) {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      angle[i] = atan2(y, x);
      RAD_to_DEG(angle[i]);
    }
    sort(angle, angle + n);
    long double max_ang = angle[0] - angle[n - 1] + 2 * acos(-1.0);
    for (int i = 0; i < n - 1; i++) {
      max_ang = max(max_ang, angle[i + 1] - angle[i]);
    }
    cout << fixed << setprecision(10) << 360 - RAD_to_DEG(max_ang) << endl;
  }
  return 0;
}