#include <bits/stdc++.h>
using namespace std;
long double angle(int x, int y) {
  long double a = atan2(y, x);
  if (a < 1e-9) a += 2 * 3.14159265;
  return a;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x, y;
  cin >> n;
  long double arr[n];
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    arr[i] = angle(x, y);
  }
  sort(arr, arr + n);
  long double ans = arr[n - 1] - arr[0];
  for (int i = 0; i < n - 1; i++) {
    ans = min(ans, 2 * 3.14159265 - arr[i + 1] + arr[i]);
  }
  cout << fixed << setprecision(10) << ans * 180.0 / 3.14159265;
  return 0;
}
