#include <bits/stdc++.h>
using namespace std;
const int oo = 1e9;
const int N = 1e5 + 5;
const double PI = 3.14159265;
int n;
double a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    a[i] = atan2(x, y);
    if (a[i] < 0) a[i] += 2 * PI;
    a[i] *= 180 / PI;
  }
  sort(a, a + n);
  if (n == 1) {
    cout << 0.000000;
    return 0;
  }
  if (n == 2) {
    cout << abs(a[0] - a[1]);
    return 0;
  }
  double ans = oo;
  for (int i = 0; i < n - 1; i++) {
    ans = min(ans, 360 - abs(a[i] - a[i + 1]));
  }
  ans = min(ans, abs(a[n - 1] - a[0]));
  cout << setprecision(10) << fixed << ans;
}
