#include <bits/stdc++.h>
using namespace std;
int n;
const double pi = 3.1415926535;
struct node {
  double x, y;
  double part;
} p[100010];
bool cmp(node a, node b) { return a.part < b.part; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
    p[i].part = atan2(p[i].y, p[i].x);
  }
  sort(p + 1, p + 1 + n, cmp);
  double maxx = 0;
  for (int i = 1; i < n; i++) {
    maxx = max(maxx, p[i + 1].part - p[i].part);
  }
  maxx = max(maxx, p[1].part + 2 * pi - p[n].part);
  printf("%.10lf", 360 * (2 * pi - maxx) * 1.0 / (2 * pi));
  return 0;
}
