#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int i;
  vector<double> arr(n);
  double a, b;
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    arr[i] = atan2(b, a) * (180 / 3.1415926535897932384626);
    if (arr[i] < 0) arr[i] += 360;
  }
  if (n == 1) {
    cout << 0 << '\n';
    return 0;
  }
  sort(arr.begin(), arr.end());
  double ans = 360;
  for (i = 0; i < n; i++) {
    ans = min(ans, 360 - (arr[i + 1] - arr[i]));
  }
  ans = min(ans, arr[n - 1] - arr[0]);
  cout << setprecision(12) << ans << '\n';
  return 0;
}
