#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926536;
int main() {
  int n;
  long double x, y;
  cin >> n;
  set<long double> angle;
  set<long double>::iterator it;
  set<long double>::iterator it2;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    angle.insert(atan2(y, x));
  }
  it = angle.end();
  long double max = 2 * pi + *(angle.begin()) - *(--it);
  long double temp;
  for (it = angle.begin(); it != angle.end(); it++) {
    it2 = it;
    temp = *(++it2) - *it;
    if (temp > max) max = temp;
  }
  cout << fixed << setprecision(9) << (2 * pi - max) * 180 / pi;
  cin.get();
  cin.get();
  return 0;
}
