#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y;
  cin >> n;
  vector<double> angles;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    double a = atan2(y, x);
    a = a * 180 / acos(-1);
    if (a < 0) a += 360;
    angles.push_back(a);
  }
  double ans = 0;
  sort(angles.begin(), angles.end());
  for (int i = 0; i < n - 1; i++) {
    ans = max(ans, angles[i + 1] - angles[i]);
  }
  ans = max(ans, angles.front() + 360 - angles.back());
  printf("%.10f\n", 360 - ans);
  return 0;
}
