#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<double> angles;
  long n, x, y;
  double angle;
  cin >> n;
  while (n--) {
    cin >> x >> y;
    angle = atan2(y, x);
    angles.push_back(angle);
  }
  sort(angles.begin(), angles.end());
  angle = angles.front() - angles.back() + 2 * M_PI;
  for (unsigned int i = 1; i < angles.size(); i++) {
    if (angles[i] - angles[i - 1] > angle) {
      angle = angles[i] - angles[i - 1];
    }
  }
  angle = 360 - (angle * 180 / M_PI);
  cout << std::fixed << std::setprecision(7) << angle;
}
