#include <bits/stdc++.h>
using namespace std;
vector<double> Angles;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long x, y, n;
  double angle;
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> x >> y;
    if (x == 0) {
      if (y >= 0)
        Angles.push_back(90.0);
      else
        Angles.push_back(270.0);
    } else {
      if (x >= 0 && y >= 0) {
        angle = atan((double)y / (double)x);
        angle *= 180.0;
        angle /= acos(-1.0);
        Angles.push_back(angle);
      } else if (x < 0 && y >= 0) {
        angle = atan((double)y / (double)x);
        angle *= 180.0;
        angle /= acos(-1.0);
        Angles.push_back(angle + 180.0);
      } else if (x < 0 && y < 0) {
        angle = atan((double)y / (double)x);
        angle *= 180.0;
        angle /= acos(-1.0);
        Angles.push_back(angle + 180.0);
      } else if (x > 0 && y < 0) {
        angle = atan((double)y / (double)x);
        angle *= 180.0;
        angle /= acos(-1.0);
        Angles.push_back(angle + 360.0);
      }
    }
  }
  sort(Angles.begin(), Angles.end());
  angle = 360.0;
  for (long long i = 0; i < Angles.size() - 1; ++i)
    angle = min(angle, 360.0 - abs(Angles[i] - Angles[i + 1]));
  angle = min(angle, abs(Angles[0] - Angles[n - 1]));
  cout << setprecision(20) << angle << "\n";
  return 0;
}
