#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
struct point {
  double x, y;
  double angle;
} p[100005];
bool cmp(point a, point b) { return a.angle < b.angle; }
int main() {
  point cen;
  cen.x = 0.0;
  cen.y = 0.0;
  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) / pi * 180;
  }
  sort(p, p + n, cmp);
  double max = 0.0;
  for (int i = 0; i < n; i++) {
    double term = p[(i + 1) % n].angle - p[i].angle;
    if (i == n - 1) term = 360 + term;
    max = ((max) > (term) ? (max) : (term));
  }
  printf("%.10f\n", 360 - max);
  return 0;
}
