#include <bits/stdc++.h>
using namespace std;
int main() {
  double n = 0;
  cin >> n;
  double x, y;
  vector<double> v;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &x, &y);
    if (x > 0 && y >= 0) v.push_back(atan(y / x));
    if (x < 0 && y <= 0) v.push_back(3.141592653589 + atan(y / x));
    if (x < 0 && y > 0) v.push_back(3.141592653589 + atan(y / x));
    if (x > 0 && y < 0) v.push_back((2 * 3.141592653589) + atan(y / x));
    if (x == 0 && y < 0) v.push_back(3 * 3.141592653589 / 2.0);
    if (x == 0 && y > 0) v.push_back(3.141592653589 / 2.0);
  }
  sort(v.begin(), v.end());
  double ma = 0;
  cout.precision(12);
  for (int i = 0; i < n - 1; i++)
    ma = max(ma, 180 * (v[i + 1] - v[i]) / 3.141592653589);
  ma = max(ma, 180 * ((2 * 3.141592653589) + v[0] - v[n - 1]) / 3.141592653589);
  cout << 360 - ma;
  return 0;
}
