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