#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
long double angle(const pair<int, int> &p) {
  long double a = atan2(p.second, p.first);
  if (a < 0) a += 2 * pi;
  return a;
}
int n;
pair<int, int> p[100005];
set<long double> S;
vector<long double> x;
void solve() {
  S = set<long double>();
  for (int i = 0; i < n; i++) {
    S.insert(angle(p[i]));
  }
  x = vector<long double>(S.begin(), S.end());
  if (x.size() == 1) {
    cout << "0.0000000000000000000" << endl;
    return;
  }
  long double ans = 100;
  n = x.size();
  for (int i = 0, j = 1; i < n; i++, j = (j + 1) % n) {
    long double d = x[j] - x[i];
    if (d < 0) d += 2 * pi;
    long double a = 2 * pi - d;
    ans = min(ans, a);
  }
  cout << fixed << setprecision(20) << ans / pi * 180 << endl;
}
int main() {
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      scanf("%d %d", &p[i].first, &p[i].second);
    }
    solve();
  }
}
