#include <bits/stdc++.h>
using namespace std;
template <typename T>
std::vector<std::vector<std::vector<T>>> make_3d_vector(long long z,
                                                        long long y,
                                                        long long x,
                                                        T value = T{}) {
  return std::vector<std::vector<std::vector<T>>>(
      z, std::vector<std::vector<T>>(y, std::vector<T>(x, value)));
}
template <typename T>
std::vector<std::vector<T>> make_2d_vector(long long z, long long y,
                                           T value = T{}) {
  return std::vector<std::vector<T>>(z, std::vector<T>(y, value));
}
template <typename T>
std::vector<T> make_1d_vector(long long z, T value = T{}) {
  return std::vector<T>(z, value);
}
void solve() {
  cout.precision(25);
  long long n;
  cin >> n;
  vector<double> v(n);
  for (long long i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    double rad = atan2(y, x);
    v[i] = (rad * 360.0) / (2.0 * 2.0 * acos(0.0));
    if (v[i] < 0.000) {
      v[i] += 360.00000;
    }
  }
  sort(v.begin(), v.end());
  double ans = v[n - 1] - v[0];
  for (long long i = 1; i < n; i++) {
    double option = 360.000 - v[i] + v[i - 1];
    ans = min(ans, option);
  }
  cout << fixed << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
}
