#include <bits/stdc++.h>
using namespace std;
vector<double> e;
int main() {
  int n, i;
  double x, y;
  cin >> n;
  for (i = 0; i < n; i++) {
    scanf("%lf %lf", &x, &y);
    double tmp = atan2(y, x);
    if (tmp < 0)
      e.push_back(2 * M_PI + tmp);
    else
      e.push_back(tmp);
  }
  sort(e.begin(), e.end());
  double dif = 0.0;
  for (i = 1; i < e.size(); i++) dif = max(dif, e[i] - e[i - 1]);
  dif = max(dif, 2 * M_PI - (e[n - 1] - e[0]));
  printf("%.10lf\n", 360.0 - dif * 180.0 / M_PI);
  return 0;
}
