#include <bits/stdc++.h>
using namespace std;
int n;
long double u[100005], pi = acos(-1), ans, dif;
struct punct {
  int x, y;
} p[100005];
long double unghi(long double x, long double y) {
  return (atan2(y, x) * 180 / pi);
}
int main() {
  int i;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> p[i].x >> p[i].y;
    u[i] = unghi(p[i].x, p[i].y);
  }
  sort(u + 1, u + n + 1);
  ans = 360 - (u[n] - u[1]);
  for (i = 1; i < n; i++) {
    dif = abs(u[i + 1] - u[i]);
    ans = max(ans, dif);
  }
  cout << fixed << setprecision(10) << 360 - ans;
  return 0;
}
