#include <bits/stdc++.h>
using namespace std;
double slop(double x1, double y1, double x2, double y2) {
  if (abs(x2 - x1) <= 0.00001) {
    return 1000000000;
  } else {
    return (y2 - y1) / (x2 - x1);
  }
}
double angle(double x, double y, double kon) {
  if (x < 0 && y >= 0) {
    return 180 + kon;
  } else if (x <= 0 && y < 0) {
    return 180 + kon;
  } else if (x > 0 && y < 0) {
    return 360 + kon;
  } else {
    return kon;
  }
}
double ang[100005];
double x[100005], y[100005], d;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    d = (atan2(y[i], x[i]) * 180.0) / acos(-1);
    ang[i] = d;
  }
  sort(ang, ang + n);
  double ans = 360 - (ang[0] - ang[n - 1] + 360);
  for (int i = 1; i < n; i++) {
    ans = min(ans, 360 - (ang[i] - ang[i - 1]));
  }
  cout << setprecision(15) << fixed << ans << endl;
}
