#include <bits/stdc++.h>
using namespace std;
double pi = 2 * asin(1);
int main() {
  int n, i;
  scanf("%d", &n);
  double angle[n + 1];
  for (i = 0; i < n; i++) {
    double x, y;
    scanf("%lf%lf", &x, &y);
    if (x == 0) {
      if (y > 0)
        angle[i] = pi / 2.0;
      else
        angle[i] = -pi / 2.0;
    } else if (x < 0 && y >= 0)
      angle[i] = pi - (atan(-y / x));
    else if (x < 0 && y < 0)
      angle[i] = -pi + (atan(y / x));
    else if (x > 0 && y >= 0)
      angle[i] = (atan(y / x));
    else
      angle[i] = -atan(-y / x);
  }
  sort(angle, angle + n);
  double ans;
  ans = angle[n - 1] - angle[0];
  for (i = 0; i < n - 1; i++) ans = min(ans, 2 * pi - angle[i + 1] + angle[i]);
  printf("%.12lf\n", (180.0 * ans) / pi);
  return 0;
}
