#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const double pi = 2 * asin(1.0);
int n;
int m;
vector<double> v;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v.push_back(atan2(y + 0.0, x + 0.0));
  }
  sort((v).begin(), (v).end());
  v.push_back(v[0] + 2 * pi);
  double ans = 0;
  for (int i = 0; i + 1 < ((int)(v).size()); i++)
    ans = max(ans, v[i + 1] - v[i]);
  printf("%.10f\n", (2 * pi - ans) / pi * 180);
  return 0;
}
