#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x;
  double y;
  double angle;
} p[100002];
bool cmp(Point a, Point b) { return a.angle < b.angle; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &p[i].x, &p[i].y);
    p[i].angle = atan2(p[i].y, p[i].x);
  }
  sort(p, p + n, cmp);
  double ans = 2 * acos(-1.0);
  p[n].angle = ans + p[0].angle;
  for (int i = 0; i < n; i++) {
    ans = min(ans, 2 * acos(-1.0) - fabs(p[i + 1].angle - p[i].angle));
  }
  printf("%.10f\n", ans * 180.0 / acos(-1.0));
  return 0;
}
