#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  vector<double> A;
  double pi = acos(-1);
  for (int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    A.push_back(atan2(y, x));
  }
  sort(A.begin(), A.end());
  double ans = 0.0;
  for (int i = 0; i < A.size() - 1; i++) ans = max(ans, A[i + 1] - A[i]);
  ans = max(ans, 2 * pi - A[A.size() - 1] + A[0]);
  printf("%.10f\n", 360.0 - ans / pi * 180.0);
  return 0;
}
