#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  double x, y, mx = 0.0, a[100000];
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    a[i] = atan2(y, x) * 180.0 / 3.14159265359;
  }
  if (n == 1) {
    cout << 0;
    return 0;
  }
  j = 1;
  sort(a, a + n);
  mx = a[1] - a[0];
  for (i = 1; i < n - 1; i++)
    if (a[i + 1] - a[i] > mx) mx = a[i + 1] - a[i];
  j = mx;
  if (a[0] + 360 - a[n - 1] > mx) mx = a[0] + 360 - a[n - 1];
  cout << setprecision(10) << 360 - mx;
  return 0;
}
