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