#include <bits/stdc++.h>
using namespace std;
int ToInt(string& s, int len) {
  int r = 0;
  for (int i = 0, max_ = (len); i < max_; ++i) {
    r *= 10;
    r += s[i] - '0';
  }
  return r;
}
int GCD(int a, int b) { return b != 0 ? GCD(b, a % b) : a; }
int LCM(int a, int b) { return a * (b / GCD(a, b)); }
long long Pow(long long n, long long e) {
  if (e == 0) return 1;
  if (e == 1)
    return n;
  else if (e & 1) {
    long long t = Pow(n, e / 2);
    return n * t * t;
  } else {
    long long t = Pow(n, e / 2);
    return t * t;
  }
}
int main() {
  vector<double> v;
  int N, x, y;
  scanf("%d", &N);
  for (int i = 0, max_ = (N); i < max_; ++i) {
    scanf("%d %d", &x, &y);
    v.push_back(atan2((double)y, (double)x) * 180.0 /
                3.1415926535897932384626433832795);
  }
  sort((v).begin(), (v).end());
  double min = 500.0;
  for (int i = 0, max_ = (N - 1); i < max_; ++i)
    min = std::min(min, 360.0 - (v[i + 1] - v[i]));
  min = std::min(min, v[N - 1] - v[0]);
  printf("%lf\n", min);
  return 0;
}
