#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  double x, y;
  vector<double> v;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    double res = atan2(y, x) * 180 / 3.14159265;
    v.push_back(res);
  }
  sort(v.begin(), v.end());
  double ans = 1000;
  for (int i = 0; i < n - 1; i++) {
    ans = min(360 - (v[i + 1] - v[i]), ans);
  }
  ans = min(ans, v[n - 1] - v[0]);
  cout << setprecision(9) << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
