#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
double a, b, c[100005], mx;
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &a, &b);
    c[i] = (atan2(b, a) * 180) / pi;
  }
  sort(c, c + n);
  for (int i = 0; i < n - 1; i++) {
    mx = max(mx, c[i + 1] - c[i]);
  }
  mx = max(mx, 360 - c[n - 1] + c[0]);
  printf("%0.08lf\n", 360 - mx);
  return 0;
}
