#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  double arr[n];
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    arr[i] = atan2(y, x) * 180 / acos(-1);
  }
  sort(arr, arr + n);
  double best = arr[n - 1] - arr[0];
  for (int i = 1; i < n; i++) best = min(best, arr[i - 1] - arr[i] + 360);
  printf("%.9lf\n", best);
  return 0;
}
