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<long long> ar[1000001];
int a2d[1001][1001], seg_tree[400004];
long long vis[1000001], vis2d[1001][1001];
int dis[1000001];
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
long long n, m, a, k, p, t, b;
bool isValid(int x, int y) {
  if (x < 1 || x > n || y < 1 || y > m) return false;
  if (vis2d[x][y]) return false;
  return true;
}
void dfs(int node) {
  vis[node] = 1;
  for (int child : ar[node]) {
    if (!vis[child]) dfs(child);
  }
}
int l = 0;
void dfsongrid(int x, int y) {
  vis2d[x][y] = 1;
  for (int i = 0; i < 4; i++)
    if (isValid(x + dx[i], y + dy[i]) && a2d[x + dx[i]][y + dy[i]] == '.')
      dfsongrid(x + dx[i], y + dy[i]);
}
void bfson2d(int x, int y) {
  queue<pair<int, int>> q;
  q.push(make_pair(x, y));
  vis2d[x][y] = 1;
  l++;
  while (!q.empty()) {
    int curx = q.front().first, cury = q.front().second;
    q.pop();
    for (int i = 0; i < 4; i++) {
      if (isValid(curx + dx[i], cury + dy[i]) &&
          a2d[curx + dx[i]][cury + dy[i]] == '.') {
        if (k == p - l) return;
        q.push(make_pair(curx + dx[i], cury + dy[i]));
        vis2d[curx + dx[i]][cury + dy[i]] = 1;
        l++;
      }
    }
  }
}
void bfs(int n) {
  queue<int> q;
  q.push(n);
  vis[n] = 1;
  dis[n] = 0;
  while (!q.empty()) {
    int curr = q.front();
    q.pop();
    for (int c : ar[curr]) {
      if (vis[c] == 0) {
        q.push(c);
        dis[c] = dis[curr] + 1;
        vis[c] = 1;
      }
    }
  }
}
long long bin(long long i) {
  long long j, sum = 0, t;
  vector<int> v;
  while (i != 0) {
    t = i % 2;
    v.push_back(t);
    i = i / 2;
  }
  reverse(v.begin(), v.end());
  for (j = 0; j < v.size(); j++) {
    sum = sum + ((v[j]) * pow(10, v.size() - j - 1));
  }
  return sum;
}
long long A[101][101], I[101][101];
void mul(long long A[][101], long long B[][101], long long dim) {
  long long res[dim + 1][dim + 1];
  for (int i = 0; i < dim; i++) {
    for (int j = 0; j < dim; j++) {
      res[i][j] = 0;
      for (int k = 0; k < dim; k++)
        res[i][j] =
            (res[i][j] % 1000000007 +
             (A[i][k] % 1000000007) * (B[k][j] % 1000000007) % 1000000007) %
            1000000007;
    }
  }
  for (int i = 0; i < dim; i++)
    for (int j = 0; j < dim; j++) A[i][j] = res[i][j];
}
void power(long long A[][101], long long dim, long long n) {
  for (int i = 0; i < dim; i++)
    for (int j = 0; j < dim; j++) {
      if (i == j)
        I[i][j] = 1;
      else
        I[i][j] = 0;
    }
  while (n) {
    if (n % 2)
      mul(I, A, dim), n--;
    else
      mul(A, A, dim), n /= 2;
  }
  for (int i = 0; i < dim; i++)
    for (int j = 0; j < dim; j++) A[i][j] = I[i][j];
}
long long phi_a(long long n) {
  long long res = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      res /= i;
      res *= i - 1;
      while (n % i == 0) n /= i;
    }
  }
  if (n > 1) res /= n, res *= n - 1;
  return (res);
}
int fi[1000001];
void phi() {
  for (int i = 1; i < 1000001; i++) fi[i] = i;
  for (int i = 2; i < 1000001; i++) {
    if (fi[i] == i) {
      for (int j = i; j < 1000001; j += i) {
        fi[j] /= i;
        fi[j] *= (i - 1);
      }
    }
  }
}
int primes[1000001] = {0};
void sieve() {
  primes[0] = primes[1] = 1;
  for (int i = 2; i * i < 1000001; i++) {
    if (!primes[i])
      for (int j = i * i; j < 1000001; j += i) primes[j] = 1;
  }
}
int col[1000001], leaf[1000001];
void lea(int n) {
  vis[n] = 1;
  for (int child : ar[n]) {
    if (!vis[child]) {
      lea(child);
      leaf[n] += leaf[child];
    }
  }
  if (ar[n].size() == 1 && n != 1) leaf[n] = 1;
}
bool good(long long x) {
  while (x) {
    if (x % 10 != a && x % 10 != b) return false;
    x /= 10;
  }
  return true;
}
long long modInverse(long long a) {
  long long modu = 1000000007;
  long long m0 = modu;
  long long y = 0, x = 1;
  while (a > 1) {
    long long q = a / modu;
    long long t = modu;
    modu = a % modu;
    a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long bs(long long n, long long m) {
  long long low = 1, high = INT_MAX, ans;
  while (low <= high) {
    long long mid = (low + high) / 2;
    if (mid - mid / n < m)
      low = mid + 1;
    else if (mid - mid / n > m)
      high = mid - 1;
    else {
      ans = mid;
      high = mid - 1;
    }
  }
  return ans;
}
long long dp[1001][1001], H[1001], K[1001];
void solve() {
  cin >> n;
  long long m = 0;
  for (int i = 1; i < n + 1; i++) cin >> H[i], m = max(m, H[i]);
  for (int i = 1; i < n + 1; i++) cin >> K[i];
  sort(K + 1, K + n + 1);
  dp[0][0] = 0;
  for (int i = 1; i < (2 * m) + 1; i++) dp[0][i] = 1000000000;
  for (int i = 1; i < n + 1; i++) {
    for (int j = 0; j < (2 * m) + 1; j++) {
      dp[i][j] = dp[i - 1][j];
      if (K[i] <= j) dp[i][j] = min(dp[i][j], 1 + dp[i][j - K[i]]);
    }
  }
  long long res = 0;
  for (int i = 1; i < n + 1; i++) {
    res += dp[n][2 * H[i]];
  }
  cout << res << endl;
}
vector<long long> yang(3, 0);
vector<long long> monster(3, 0);
vector<long long> price(3, 0);
int main() {
  cout.precision(18);
  ios::sync_with_stdio(0);
  cin.tie(0);
  double pi = 4 * atan(1);
  int x, y;
  cin >> n;
  vector<double> angles;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    angles.push_back((atan2(y, x) * 180) / pi);
  }
  sort(angles.begin(), angles.end());
  angles.push_back(angles.front() + 360);
  double ans = angles.back() - angles.front();
  for (int i = 0; i < angles.size() - 1; i++) {
    ans = min(ans, 360 - fabs(angles[i + 1] - angles[i]));
  }
  cout << ans;
  return 0;
}