#include <bits/stdc++.h>
using namespace std;
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
int main() {
  int n;
  cin >> n;
  vector<double> V(n);
  double x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    V[i] = atan2(y, x);
    if (V[i] < 0) V[i] += 2 * acos(-1.0);
  }
  sort(V.begin(), V.end());
  double mx = 0.0;
  V.push_back(V[0] + 2.0 * acos(-1.0));
  for (int i = 0; i < n; i++) mx = max(mx, V[i + 1] - V[i]);
  cout << fixed << setprecision(8) << 360.0 - (mx * 180.0) / acos(-1.0);
}
