#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
double d[maxn], a, b;
int n;
int main() {
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      cin >> a >> b;
      d[i] = atan2(b, a) * (180 / 3.141592654);
    }
    sort(d, d + n);
    double ans = 0.0;
    d[n] = d[0] + 360;
    for (int i = 0; i < n; i++) ans = max(ans, d[i + 1] - d[i]);
    printf("%.8lf\n", 360 - ans);
  }
  return 0;
}
