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>
#include <bits/stdc++.h>
using namespace std;
bool igual(long double a, long double b) { return fabs(a - b) < 1e-9; }
bool maior(long double a, long double b) { return a > 1e-9 + b; }
bool menor(long double a, long double b) { return a + 1e-9 < b; }
bool maiorIgual(long double a, long double b) {
  return maior(a, b) || igual(a, b);
}
bool menorIgual(long double a, long double b) {
  return menor(a, b) || igual(a, b);
}
struct pv {
  long double x, y;
  long double ang;
  pv() {}
  pv(long double _ang, long double _x, long double _y) {
    ang = _ang;
    x = _x;
    y = _y;
  }
  pv operator-(pv other) { return pv(x - other.x, y - other.y, 0); }
  bool operator<(pv other) const { return menor(ang, other.ang); }
};
long double cross(pv a, pv b) { return a.x * b.y - a.y * b.x; }
long double dot(pv a, pv b) { return a.x * b.x + a.y * b.y; }
long double polarAngle(pv v) {
  long double x = v.x;
  long double y = v.y;
  long double aux = atan2(y, x);
  if (menor(aux, 0.0)) aux += 2.0 * acos(-1);
  return aux;
}
long double toDegree(long double rad) { return rad * 180 / acos(-1); }
long double norma(pv a) { return sqrt(dot(a, a)); }
long double angle2Vec(pv v, pv u) {
  long double ang1 = polarAngle(v);
  long double ang2 = polarAngle(u);
  long double ans = 0.0;
  ans = min(fabs(ang1 - ang2), fabs(2.0 * acos(-1) + ang1 - ang2));
  ans = min(ans, fabs(2.0 * acos(-1) + ang2 - ang1));
  return ans;
}
bool ccw(pv a, pv b, pv c) {
  long double aux = cross(b - a, c - b);
  return maior(aux, 0.0);
}
long double func(pv a, pv b, int op) {
  if (op == 0) return b.ang - a.ang;
  return 2 * acos(-1) - a.ang + b.ang;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  vector<pv> v;
  cin >> n;
  long double x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back(pv(polarAngle(pv(0, x, y)), x, y));
  }
  sort(v.begin(), v.end());
  v.push_back(v[0]);
  long double ans = -1;
  long double aux;
  for (int i = 0; i < v.size() - 1; i++) {
    aux = func(v[i], v[i + 1], i == v.size() - 2 ? 1 : 0);
    if (maior(aux, ans)) ans = aux;
  }
  cout << fixed << setprecision(12) << 360 - toDegree(ans) << "\n";
  return 0;
}
