#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-12;
const double PI = 3.1415926535897932384626;
int n;
vector<double> angle;
int main() {
  scanf("%d", &n);
  double x, y;
  for (int i = 1; i <= n; ++i) {
    scanf("%lf%lf", &x, &y);
    angle.push_back(atan2(y, x) * 180.0 / PI);
  }
  sort(angle.begin(), angle.end());
  double ans = 360.0;
  for (int i = 0; i < n; ++i) {
    double cur;
    if (i == 0)
      cur = angle[n - 1] - angle[0];
    else
      cur = 360.0 - (angle[i] - angle[i - 1]);
    if (cur < ans) ans = cur;
  }
  printf("%.10f\n", ans);
  return 0;
}
