#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
const int N = 100005;
const double pi = acos(-1), eps = 1e-9;
double angle[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    angle[i] = atan2(y, x);
    if (angle[i] < -eps) angle[i] += 2 * pi;
  }
  sort(angle, angle + n);
  double ans = angle[n - 1] - angle[0];
  for (int i = 0; i < n - 1; i++) {
    double cur = 2 * pi - (angle[i + 1] - angle[i]);
    if (cur < ans) ans = cur;
  }
  return printf("%.17lf\n", ans * 180 / pi) & 0;
}
