#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
pair<long long int, long long int> s4[4] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
pair<long long int, long long int> s8[8] = {
    {-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}};
void solve() {
  long long int n, x, y;
  cin >> n;
  vector<double> v;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back((atan2(1.0 * y, 1.0 * x) * 180.0) / acos(-1));
  }
  sort(v.begin(), v.end());
  double ans = v[n - 1] - v[0];
  for (int i = 0; i < n; i++) {
    ans = min(ans, 360.0 - (v[i] - v[i - 1]));
  }
  cout << fixed << setprecision(10) << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  solve();
}
