#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897932384626;
int main() {
  int n;
  cin >> n;
  vector<long double> angles;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    angles.push_back(atan2l(y, x) * 180.0 / PI);
  }
  sort(angles.begin(), angles.end());
  long double angle = angles[n - 1] - angles[0];
  for (int i = 1; i < n; i++)
    angle = min(angle, angles[i - 1] + 360 - angles[i]);
  cout.precision(12);
  cout << fixed << angle << endl;
}
