#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
double PI = 3.1415926535897932384626433832795;
const long long oo = (long long)1e9 + 1;
const double eps = 1e-9;
const long long mod = 1000000009;
int main() {
  ios_base::sync_with_stdio(0);
  vector<double> angles;
  int n;
  cin >> n;
  double x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    angles.push_back(atan2(y, x) * 180 / M_PI);
  }
  sort(angles.begin(), angles.end());
  double ans = *angles.rbegin() - angles[0];
  for (int i = 1; i < ((long long)angles.size()); ++i)
    ans = min(ans, 360 - angles[i] + angles[i - 1]);
  printf("%.10lf\n", ans);
  return 0;
}
