#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int maxN = 2e5 + 11;
double a[maxN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    a[i] = atan2(y, x);
  }
  sort(a, a + n);
  double ans = PI * 2;
  for (int i = 0; i < n - 1; i++) ans = min(ans, PI * 2.0 - a[i + 1] + a[i]);
  ans = min(ans, -a[0] + a[n - 1]);
  ans = (ans / PI * 180);
  cout << setprecision(10) << ans << endl;
  return 0;
}
