#include <bits/stdc++.h>
using namespace std;
const int maxn = 100020;
double k[maxn], x[maxn], y[maxn];
double pi = acos(-1.);
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++) {
    k[i] = atan2(x[i], y[i]);
  }
  sort(k, k + n);
  double z = 0;
  for (int i = 1; i <= n; i++) z = max(z, k[i] - k[i - 1]);
  z = max(z, k[0] - k[n - 1] + 2 * pi);
  z = z / pi * 180;
  printf("%.9f", 360 - z);
  return 0;
}
