#include <bits/stdc++.h>
using namespace std;
vector<long long> v[1000005];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long i, n;
  cin >> n;
  double ans = 0;
  vector<double> ar;
  for (int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    double z = atan2(y, x) * (180 / 3.141592653589793238462643383);
    ar.push_back(z);
  }
  long long flag = 0;
  sort(ar.begin(), ar.end());
  double x = ar[n - 1] - ar[0];
  for (i = 0; i < n - 1; i++) {
    if (360 - ar[i + 1] + ar[i] < x) x = 360 - ar[i + 1] + ar[i];
  }
  cout << fixed << setprecision(6) << x;
}
