#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * acos(0.0);
struct point {
  int x, y;
  point(int _x, int _y) : x(_x), y(_y) {}
};
struct vec {
  double x, y;
  vec(double _x, double _y) : x(_x), y(_y) {}
};
vec toVector(point a, point b) { return vec(b.x - a.x, b.y - a.y); }
double dotProd(vec a, vec b) { return a.x * b.x + a.y * b.y; }
double norm_sq(vec v) { return v.x * v.x + v.y * v.y; }
double angle(point a) {
  vec oa = toVector(point(0, 0), a);
  vec ob = toVector(point(0, 0), point(1, 0));
  return acos(dotProd(oa, ob) / sqrt(norm_sq(oa) * norm_sq(ob)));
}
int main() {
  int n, x, y, q;
  scanf("%d", &n);
  set<double> st;
  while (n--) {
    scanf("%d %d", &x, &y);
    if (x >= 0)
      q = (y >= 0 ? 1 : 4);
    else
      q = (y >= 0 ? 2 : 3);
    point p = point(x, y);
    double ang = angle(p) * 180 / PI;
    if (q > 2) ang = 360.0 - ang;
    st.insert(ang);
  }
  double res = 0.0;
  auto it1 = st.begin(), it2 = st.begin();
  it2++;
  while (it2 != st.end()) {
    res = max(res, (*it2) - (*it1));
    it1++;
    it2++;
  }
  it2 = st.begin();
  res = max(res, 360.0 + (*it2) - (*it1));
  printf("%0.10lf", 360.0 - res);
}
