#include <bits/stdc++.h>
using namespace std;
int const MAXN = 100005;
int main(void) {
  int N, xx, yy;
  double d[MAXN], x, y;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> xx >> yy;
    if (xx == 0) {
      if (yy > 0) {
        d[i] = 90;
      } else {
        d[i] = 270;
      }
      continue;
    }
    x = (double)xx;
    y = (double)yy;
    double r = y / x;
    if (r < 0.0000000000000001) {
      r = -r;
    }
    r = atan(r) * 180 / 3.14159265;
    if (xx > 0 && yy >= 0) {
      d[i] = r;
    }
    if (xx > 0 && yy < 0) {
      d[i] = 360 - r;
    }
    if (xx < 0 && yy >= 0) {
      d[i] = 180 - r;
    }
    if (xx < 0 && yy < 0) {
      d[i] = 180 + r;
    }
  }
  sort(d + 1, d + N + 1);
  double angl;
  angl = 360 - (d[N]) + d[1];
  for (int i = 1; i < N; i++) {
    angl = max(angl, d[i + 1] - d[i]);
  }
  if (angl < 0.0000000000000001) {
    angl = 360;
  }
  cout.precision(30);
  cout << 360 - angl << endl;
  return 0;
}
