#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
using ld = long double;
const int N = 4e4 + 1;
const lli MOD = 1e9 + 9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<ld> v;
  set<ld> s;
  for (int i = 0; i < n; i++) {
    ld x, y;
    cin >> x >> y;
    v.push_back(atan2(y, x));
    s.insert(atan2(y, x));
  }
  if (s.size() == 1) {
    cout << fixed << setprecision(20) << 0.0000000069;
    return 0;
  }
  ld val = 0;
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    ld a = v[i];
    ld b = v[(i + 1) % n];
    if (b < a) {
      b += 4 * acos(0);
    }
    val = max(val, b - a);
  }
  cout << fixed << setprecision(20) << 360.0 - 180 * val / (2 * acos(0));
}
