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;
const int dy[] = {-1, 0, 1, 0}, dx[] = {0, 1, 0, -1};
const double EPS = 1e-8;
const double PI = acos(-1.0);
int popcount(int n) { return __builtin_popcount(n); }
int popcount(long long n) { return __builtin_popcountll(n); }
template <class T>
int SIZE(T a) {
  return a.size();
}
template <class T>
string IntToString(T num) {
  string res;
  stringstream ss;
  ss << num;
  return ss.str();
}
template <class T>
T StringToInt(string str) {
  T res = 0;
  for (int i = 0; i < SIZE(str); i++) res = (res * 10 + str[i] - '0');
  return res;
}
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
void PrintSeq(T &a, int sz) {
  for (int i = 0; i < sz; i++) {
    cout << a[i];
    if (sz == i + 1)
      cout << endl;
    else
      cout << ' ';
  }
}
bool EQ(double a, double b) { return abs(a - b) < EPS; }
void fastStream() {
  cin.tie(0);
  std::ios_base::sync_with_stdio(0);
}
vector<string> split(string str, char del) {
  vector<string> res;
  for (int i = 0, s = 0; i < SIZE(str); i++) {
    if (str[i] == del) {
      if (i - s != 0) res.push_back(str.substr(s, i - s));
      s = i + 1;
    } else if (i == SIZE(str) - 1) {
      res.push_back(str.substr(s));
    }
  }
  return res;
}
double dot(const complex<double> &a, const complex<double> &b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
double cross(const complex<double> &a, const complex<double> &b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
double diffAngle(const complex<double> &a, const complex<double> &b) {
  double angle = atan2(cross(a, b), dot(a, b));
  if (angle < 0) return 2 * PI + angle;
  return angle;
}
struct Double {
  double d;
  bool operator<(const Double &dd) const { return dd.d > this->d; }
  bool operator==(const Double &dd) const { return (EQ(dd.d, this->d)); }
  Double() {}
  Double(double _d) { d = _d; }
};
complex<double> ps[100010];
vector<Double> points;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    ps[i] = complex<double>(x, y);
  }
  const complex<double> base = complex<double>(1, 0);
  for (int i = 0; i < n; i++) {
    double d = diffAngle(base, ps[i]);
    points.push_back(Double(d));
  }
  sort(points.begin(), points.end());
  points.erase(unique(points.begin(), points.end()), points.end());
  n = points.size();
  double ans = -1;
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  } else {
    for (int i = 0; i < n; i++) {
      double diff = points[(i + 1) % n].d - points[i].d;
      if (!EQ(diff, 0) && diff < 0)
        diff = (2 * PI - points[i].d) + points[(i + 1) % n].d;
      ans = max(ans, diff);
    }
    printf("%.10f\n", 360 - (ans / PI) * 180);
  }
  return 0;
}