#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
struct Point {
  double x, y;
} p[maxn];
const double PI = acos(-1);
double ang[maxn];
const double eps = 1e-8;
int n;
int main() {
  scanf("%d", &n);
  double x, y;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &x, &y);
    if (fabs(x) < eps) {
      if (y > 0)
        ang[i] = 90;
      else
        ang[i] = 270;
    } else if (fabs(y) < eps) {
      if (x > 0)
        ang[i] = 0;
      else
        ang[i] = 180;
    } else
      ang[i] = atan((1.0 * y) / x) / PI * 180;
    if (x < 0 && y > 0)
      ang[i] += 180;
    else if (y < 0 && x > 0)
      ang[i] += 360;
    else if (y < 0 && x < 0)
      ang[i] += 180;
  }
  sort(ang, ang + n);
  double ans = ang[0] + 360 - ang[n - 1];
  for (int i = 0; i < n - 1; i++) ans = max(ans, ang[i + 1] - ang[i]);
  printf("%lf\n", 360 - ans);
  return 0;
}
