#include <bits/stdc++.h>
using namespace std;
int n;
double d[100100];
void nhap() {
  double x, y;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%lf %lf", &x, &y);
    d[i] = atan2(y, x);
  }
}
void chuanbi() {
  sort(d + 1, d + n + 1);
  d[n + 1] = d[1] + 2 * M_PI;
}
void xuli() {
  double kq = 2 * M_PI;
  for (int i = 1; i <= n; i++) kq = min(kq, 2 * M_PI - fabs(d[i] - d[i + 1]));
  printf("%0.10f", kq * 180 / M_PI);
}
void ghikq() {}
int main() {
  nhap();
  chuanbi();
  xuli();
  ghikq();
}
