#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<double> A;
  for (int i = 0, x, y; i < n; ++i) cin >> x >> y, A.push_back(atan2(y, x));
  sort(A.begin(), A.end());
  double ans = 0;
  for (int i = 0; i < n; ++i)
    ans = max(ans, abs(fmod(A[(i + 1) % n] - A[i] + 2.0 * pi, 2.0 * pi)));
  cout.precision(10);
  cout << fixed << fmod((2.0 * pi - ans) * 180.0 / pi, 360.0) << '\n';
  return 0;
}
