#include <bits/stdc++.h>
using namespace std;
double pi = 3.14159265359;
int main() {
  int n;
  cin >> n;
  vector<double> v;
  for (int i = 0; i < (int)(n); i++) {
    double x, y;
    cin >> x >> y;
    if (x == 0) {
      if (y < 0) {
        v.push_back(-90);
        v.push_back(270);
      } else {
        v.push_back(90);
        v.push_back(450);
      }
    } else if (y == 0) {
      if (x < 0) {
        v.push_back(180);
        v.push_back(-180);
      } else {
        v.push_back(0);
        v.push_back(360);
      }
    } else {
      if (x > 0) {
        double d = atan(y / x) * 180 / pi;
        v.push_back(d);
        v.push_back(d + 360);
      } else {
        double d = atan(y / x) * 180 / pi;
        if (y > 0) {
          d = 180 + d;
          v.push_back(d);
          v.push_back(d + 360);
        } else {
          d = 180 + d;
          v.push_back(d);
          v.push_back(d - 360);
        }
      }
    }
  }
  sort(v.begin(), v.end());
  double ans = 0;
  for (int i = 0; i + 1 < v.size(); i++) {
    ans = max(ans, v[i + 1] - v[i]);
  }
  printf("%.10f\n", 360 - ans);
  return 0;
}
