#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n;
long double angle[N];
int32_t main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long double x, y;
    cin >> x >> y;
    angle[i] = atan2l(y, x) * (180 / acosl(-1));
  }
  long double ans = 500;
  sort(angle + 1, angle + n + 1);
  for (long long i = 1; i < n; i++) {
    ans = min(ans, 360 - (angle[i + 1] - angle[i]));
  }
  ans = min(ans, angle[n] - angle[1]);
  cout << fixed << setprecision(12) << ans;
  return 0;
}
