#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <utility>
#include <cassert>
#include <numeric>
#include <sstream>
#include <cmath>
using namespace std;
const double M_PI = acos(0) * 2;
#define REQUIRE(cond, message) \
    do { \
        if (!(cond)) { \
            std::cerr << message << std::endl; \
            assert(false); \
        } \
    } while (false)

#define forn(i, n) for (int i = 0; i < int(n); ++i)
#define for1(i, n) for (int i = 1; i <= int(n); ++i)
#define forv(i, v) forn(i, v.size())
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef vector<string> vs;
typedef long double ld;

const int INF = std::numeric_limits<int>::max();
const char* IN_FILE = ".in";
const char* OUT_FILE = ".out";

void solve()
{
    int n; cin >> n;
    vector<double> an(n);
    double x, y;
    forn(i, n) cin >> x >> y, an[i] = atan2(y, x);
    sort(all(an));
    double mxAn = 0;
    an.pb(an[0]+2*M_PI);
    forn(i, n) {
        mxAn = max(mxAn, an[i + 1] - an[i]);
    }
    cout.precision(10);
    cout << fixed << 360.0 * (1.0 - mxAn/2/M_PI) << endl;
}

void init()
{
    freopen(IN_FILE, "rt", stdin);
    freopen(OUT_FILE, "wt", stdout);
}

int main()
{
    ios_base::sync_with_stdio(false);
    solve();
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define PI 3.141592654
#define EPS 1e-7

int main() {
    int n;
    scanf("%d" , &n);

    vector<double> V(n);

    for(int i = 0 ; i < n ; ++i) {
        int x , y;
        scanf("%d %d" , &x , &y);
        V[i] = atan2(y , x);
        if(V[i] < EPS)V[i] += 2 * PI;
    }

    sort(V.begin() , V.end());

    double res = V[n - 1] - V[0];
    for(int i = 0 ; i + 1 < n ; ++i) {
        double temp = 2 * PI - V[i + 1] + V[i];
        if(EPS < res - temp)res = temp;
    }

    printf("%6lf\n" , res * 180 / PI);
    return 0;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
#include <limits>
#include <string.h>
#include <math.h>
#include <stack>
#include <cmath>
#include <functional>
using namespace std;
const double pi = acos(-1);
int main(){
  int a, b, n;
  vector<pair<int,int> > v;
  cin>>n;
  vector<double> x;
  for(int i = 0; i < n; ++i){
    cin>>a>>b;
    x.push_back(atan2(b, a));
  }
  sort(x.begin(), x.end());
  double m = x[0] + 2 * pi - x[n - 1];
  for(int i = 1; i < n; ++i){
    m = max(m, x[i] - x[i - 1]);
  }
  printf("%.9f\n", (2 * pi - m) * 180 / pi);
  return 0;
}


#include <cmath>
#include <cstdio>

#include <algorithm>

using namespace std;

struct Point {
  int x, y;

};

long long wedgeProduct(long long ax, long long ay,
                       long long bx, long long by) {
  return ax * by - ay * bx;
}

double getAngle(const Point& p) {
  const double ang = atan2(p.y, p.x);
  if(ang < 0) return 2 * acos(-1.) + ang;
  return ang;
}

bool operator < (const Point& a, const Point& b) {
  return getAngle(a) < getAngle(b);
}

Point arr[100000];

int main() {
  int n;
  scanf("%d", &n);
  for(int i = 0; i < n; ++i){
    scanf("%d%d", &arr[i].x, &arr[i].y);
  }
  sort(arr, arr + n);
  int cnt = 0;
  for(int i = 0; i + 1 < n; ++i){
    if(!wedgeProduct(arr[i].x, arr[i].y, arr[i + 1].x, arr[i + 1].y)){
      if(arr[i].x * arr[i + 1].x + arr[i].y * arr[i + 1].y >= 0)
        ++cnt;
    }
  }
  if(cnt == n - 1){
    printf("0\n");
    return 0;
  }
  double sub = 0;
  for(int i = 0; i < n; ++i){
    const double ang1 = getAngle(arr[i]);
    const double ang2 = getAngle(arr[(i + 1) % n]);
    if(i + 1 == n) sub = max(sub, acos(-1.) * 2 - ang1 + ang2);
    else sub = max(sub, ang2 - ang1);
  }
  printf("%.10lf\n", (2 * acos(-1.) - sub) / acos(-1) * 180);
}


#include <cmath>
#include <cstdio>

#include <algorithm>

using namespace std;

struct Point {
  int x, y;

};

long long wedgeProduct(long long ax, long long ay,
                       long long bx, long long by) {
  return ax * by - ay * bx;
}

bool operator < (const Point& a, const Point& b) {
  return wedgeProduct(a.x, a.y, b.x, b.y) < 0;
}

Point arr[100000];

int main() {
  int n;
  scanf("%d", &n);
  for(int i = 0; i < n; ++i){
    scanf("%d%d", &arr[i].x, &arr[i].y);
  }
  sort(arr, arr + n);
  int cnt = 0;
  for(int i = 0; i + 1 < n; ++i){
    if(!wedgeProduct(arr[i].x, arr[i].y, arr[i + 1].x, arr[i + 1].y)){
      if(arr[i].x * arr[i + 1].x + arr[i].y * arr[i + 1].y >= 0)
        ++cnt;
    }
  }
  if(cnt == n - 1){
    printf("0\n");
    return 0;
  }
  double sub = 0;
  for(int i = 0; i < n; ++i){
    double ang1 = atan2(arr[i].y, arr[i].x);
    double ang2 = atan2(arr[(i + 1) % n].y, arr[(i + 1) % n].x);
    if(ang1 < 0) ang1 += acos(-1.) * 2;
    if(ang2 < 0) ang2 += acos(-1.) * 2;
    if(i + 1 == n) sub = max(sub, 2 * acos(-1.) - ang2 + ang1);
    else sub = max(sub, ang2 - ang1);
  }
  printf("%.10lf\n", (2 * acos(-1.) - sub) / acos(-1) * 180);
}


#include <algorithm>
#include <cmath>
#include <cstdio>

const double pi = 3.14159265358979;
double aa[101010];

int main() {
  int n, x, y;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d %d", &x, &y);
    aa[i] = acos(x / (sqrt(x * x + y * y)));
    if (y < 0) aa[i] = 2 * pi - aa[i];
  }
  std::sort(aa + 1, aa + n + 1);
  double best = aa[1] + 2 * pi - aa[n];
  for (int i = 1; i < n; ++i)
    best = std::max(best, aa[i + 1] - aa[i]);
  printf("%.12lf", 360 - best / pi * 180);
}


#include      <iostream>
#include      <iomanip>
#include      <cmath>
#include      <algorithm>

using namespace std;

long double todec(long double rad) { return rad * 180 / acos(-1); }
int main(int argc, char **argv) {
	double minA = 10000000, maxA = -10000000;
	pair<long long, long long> ptTmp;
	int n;
	cin >> n;
	if (n == 1) { cout << 0 << endl; return 0; }
	for (int i = 0; i < n; i += 1) {
		cin >> ptTmp.first >> ptTmp.second;
		const double t = atan2(ptTmp.second, ptTmp.first);
		minA = min(minA, t);
		maxA = max(maxA, t);
	}
	cout << setprecision(10) << fixed << todec(maxA - minA) << endl;

	return 0;
}


#include      <algorithm>
#include      <cmath>
#include      <iomanip>
#include      <iostream>
#include      <iterator>
#include      <limits>
#include      <list>
#include      <map>
#include      <vector>
#include      <cstdarg>
#define endl '\n'
#define each(c, e) for (typeof(c.begin()) e = c.begin(); e != c.end(); ++e)
using namespace std;
template<typename T> inline T ceilDiv(T l, T r) {return (l / r) + ((l % r) != 0);}
//const int INFTY = numeric_limits<int>::max();
const double PI = acos(-1);
int main(int argc, char **argv) {
	ios_base::sync_with_stdio(false), cin.tie(0);
	int n, x, y;
	double afAngles[50];
	cin >> n;
	if (n == 1) { cout << 0 << endl; return 0; }
	for (int i = 0; i < n; i += 1) cin >> x >> y, afAngles[i] = atan2(y, x) * 180 / PI;
	sort(afAngles, afAngles + n);
	double fMaxAngle = 360 - (afAngles[n - 1] - afAngles[0]);
	for (int i = 1; i < n; i += 1) fMaxAngle = max(afAngles[i] - afAngles[i - 1], fMaxAngle);
	cout << setprecision(10) << fixed << 360 - fMaxAngle << endl;
	return 0;
}


#include      <iostream>
#include      <iomanip>
#include      <cmath>
#include      <algorithm>

using namespace std;

long double todec(long double rad) { return rad * 180 / acos(-1); }
long double aa(long double a) { return a < 0 ? -a : a; }
int main(int argc, char **argv) {
	double minA = 10000000, maxA = -10000000;
	pair<double, double> ptTmp;
	int n;
	cin >> n;
	if (n == 1) { cout << 0 << endl; return 0; }
	for (int i = 0; i < n; i += 1) {
		cin >> ptTmp.first >> ptTmp.second;
		double t = atan2(ptTmp.second, ptTmp.first);
		if (t < 0) t += acos(-1);
		minA = min(minA, t);
		maxA = max(maxA, t);
	}
	cout << setprecision(10) << fixed << aa(todec(maxA - minA)) << endl;

	return 0;
}


#include      <iostream>
#include      <iomanip>
#include      <cmath>
#include      <algorithm>

using namespace std;

long double todec(long double rad) { return rad * 180 / acos(-1); }
int main(int argc, char **argv) {
	double minA = 10000000, maxA = -10000000;
	pair<double, double> ptTmp;
	int n;
	cin >> n;
	if (n == 1) { cout << 0 << endl; return 0; }
	for (int i = 0; i < n; i += 1) {
		cin >> ptTmp.first >> ptTmp.second;
		const double t = atan2(ptTmp.second, ptTmp.first);
		minA = min(minA, t);
		maxA = max(maxA, t);
	}
	cout << setprecision(10) << fixed << todec(maxA - minA) << endl;

	return 0;
}


#include      <algorithm>
#include      <cmath>
#include      <iostream>
#include      <iomanip>
#define endl '\n'
using namespace std;
const double PI = acos(-1);
double afAngles[100000];
int main(int argc, char **argv) {
	ios_base::sync_with_stdio(false), cin.tie(0);
	int n, x, y;
	cin >> n;
	for (int i = 0; i < n; i += 1) cin >> x >> y, afAngles[i] = atan2(y, x) * 180 / PI;
	sort(afAngles, afAngles + n);
	double fMaxAngle = 360 - (afAngles[n - 1] - afAngles[0]);
	for (int i = 1; i < n; i += 1) fMaxAngle = max(afAngles[i] - afAngles[i - 1], fMaxAngle);
	cout << setprecision(10) << fixed << 360 - fMaxAngle << endl;
	return 0;
}


#include      <iostream>
#include      <iomanip>
#include      <cmath>
#include      <algorithm>

using namespace std;

long double todec(long double rad) { return rad * 180 / acos(-1); }
long double aa(long double a) { return a < 0 ? -a : a; }
int main(int argc, char **argv) {
	double minA = 10000000, maxA = -10000000;
	pair<double, double> ptTmp;
	int n;
	cin >> n;
	if (n == 1) { cout << 0 << endl; return 0; }
	for (int i = 0; i < n; i += 1) {
		cin >> ptTmp.first >> ptTmp.second;
		const double t = atan2(ptTmp.second, ptTmp.first) + acos(-1);
		minA = min(minA, t);
		maxA = max(maxA, t);
	}
	cout << setprecision(10) << fixed << aa(todec(maxA - minA)) << endl;

	return 0;
}


#include      <algorithm>
#include      <cmath>
#include      <iomanip>
#include      <iostream>
#include      <iterator>
#include      <limits>
#include      <list>
#include      <map>
#include      <vector>
#include      <cstdarg>
#define endl '\n'
#define each(c, e) for (typeof(c.begin()) e = c.begin(); e != c.end(); ++e)
using namespace std;
template<typename T> inline T ceilDiv(T l, T r) {return (l / r) + ((l % r) != 0);}
//const int INFTY = numeric_limits<int>::max();
int main(int argc, char **argv) {
	ios_base::sync_with_stdio(false), cin.tie(0);
	int n, x, y;
	double afAngles[50];
	cin >> n;
	if (n == 1) { cout << 0 << endl; return 0; }
	for (int i = 0; i < n; i += 1) cin >> x >> y, afAngles[i] = atan2(y, x) * 180 / acos(-1);
	sort(afAngles, afAngles + n);
	double fMaxAngle = 360 - (afAngles[n - 1] - afAngles[0]);
	for (int i = 1; i < n; i += 1) fMaxAngle = max(afAngles[i] - afAngles[i - 1], fMaxAngle);
	cout << setprecision(10) << fixed << 360 - fMaxAngle << endl;
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI 3.141592653589793238462643383279L

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180 / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10Lf\n", res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI acos(-1)

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180.L / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10Lf\n", res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
#include<math.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180 / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10Lf\n", res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180 / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10Lf\n", res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
//#define M_PI acos(-1)

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P & b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(min(1.L, prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm()));
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		if(debug) printf("%Lf %Lf\n", alpha, a);
		ld k = 180.L / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10lf\n", (double) res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI 3.141592653589793238462643383279L

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180.L / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10Lf\n", res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI acos(-1)

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P & b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(max(-1.L,min(1.L, prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm())));
		ld a = asin(min(1.L,max(-1.L,(prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm())));
		ld k = 180.L / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10lf\n", (double) res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI acos(-1)

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180.L / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10lf\n", (double) res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
#include<cmath>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		ld k = 180 / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10Lf\n", res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI acos(-1)

ld uspokuj(ld a) { return max(-1.L, min(1.L, a)); }

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
	ld angleTo(P b) {
		ld nn = norm() * b.norm();
		ld alpha = acos(uspokuj(dot(b) / nn));
		ld a = asin(uspokuj((*this * b) / nn));
		if(a > 0) alpha = 2 * M_PI - alpha;
		return alpha;
	}
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = prawo[i].angleTo(prawo[i+1]) * 180.L / M_PI;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10lf\n", (double) res);
	return 0;
}


#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define maxi(a,b) a=max(a,b)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
bool debug;
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int inf = 1e9 + 5;
const int nax = 1e6 + 5;
#define M_PI acos(-1)

struct P {
	int x, y;
	P(int _x, int _y) { x = _x; y = _y; }
	P() { x = y = 0; }
	void wczytaj() { scanf("%d%d", &x, &y); }
	int operator *(P b) const { return x * b.y - y * b.x; }
	bool operator <(P b) const { return *this * b < 0; }
	int dot(P & b) { return x * b.x + y * b.y; }
	ld norm() { return sqrt((ld) x * x + y * y); }
};

int main(int argc, char *argv[])
{
	debug = argc > 1;

	ld res = 360;

	int n;
	scanf("%d", &n);
	vector<P> lewo;
	vector<P> prawo;
	REP(i, n) {
		P a;
		a.wczytaj();
		if(a.x > 0 || (a.x == 0 && a.y > 0)) prawo.pb(a);
		else lewo.pb(a);
	}
	sort(prawo.begin(), prawo.end());
	sort(lewo.begin(), lewo.end());
	for(auto a : lewo) prawo.pb(a);
	prawo.pb(prawo[0]);
	REP(i, (int) prawo.size() - 1) {
		ld alpha = acos(min(1.L, prawo[i].dot(prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm()));
		ld a = asin((prawo[i] * prawo[i+1]) / prawo[i].norm() / prawo[i+1].norm());
		if(debug) printf("%Lf %Lf\n", alpha, a);
		ld k = 180.L / M_PI;
		alpha *= k;
		a *= k;
		if(a > 0) alpha = 360 - alpha;
		if(alpha < 1e-12 && i == (int) prawo.size() - 2)
			alpha = 360;
		mini(res, 360 - alpha);
	}
	printf("%.10lf\n", (double) res);
	return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <cctype>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <complex>
#include <numeric>
#include <valarray>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define inf 1061109567
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define mem(x,a) memset(x,a,sizeof(x))
#define rep(i,n) for(int i(0),_n(n);i<_n;++i)
#define repi(i,a,b) for(int i(a),_b(b);i<_b;++i)
#define repe(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define len(x) ((int)(x.size()))

#define PI 3.141592653589793

typedef complex<double> pnt;

int n,t1,t2;

int comp(pnt p1,pnt p2){

	return arg(p1) < arg(p2);

}

int main(){

	cin>>n;

	if(n==1){
		cout<<0.000<<endl;
		return 0;
	}

	vector<pnt> v;

	rep(i,n){
		cin>>t1>>t2;
		v.pb(pnt(t1,t2));
	}

	//sort(all(v),comp);

	double d=-inf;

	vector<double> vv;

	rep(i,n)vv.pb(arg(v[i])*180/PI);

	sort(all(vv));

	vector<double> ans;

	rep(i,n-1){
		ans.pb(vv[i+1]-vv[i]);
	}

	ans.pb(360-vv.back()+vv[0]);

	d=*max_element(all(ans));

	//~ rep(i,len(v)){
		//~ t1=i;
		//~ t2=(i+1)%len(v);
		//~ double dd=(180.0*(arg(v[t2])-arg(v[t1]))/PI);
		//~ if(dd<0)dd+=360.0;
		//~ d=max(d,dd);
	//~ }

	printf("%.10lf",360.0-d);

}


#include <set>
#include <map>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <cctype>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <complex>
#include <numeric>
#include <valarray>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define inf 1061109567
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define mem(x,a) memset(x,a,sizeof(x))
#define rep(i,n) for(int i(0),_n(n);i<_n;++i)
#define repi(i,a,b) for(int i(a),_b(b);i<_b;++i)
#define repe(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define len(x) ((int)(x.size()))

#define PI 3.141592653589793

typedef complex<double> pnt;

#define DEBUG 1
#if DEBUG && !ONLINE_JUDGE
	#define debug(args...) (Debugger()) , args
	class Debugger { public: Debugger(const std::string& _separator = ", ") : first(true), separator(_separator){} template<typename ObjectType> Debugger& operator , (const ObjectType& v) { if(!first) std::cerr << separator; std::cerr << v; first = false; return *this; } ~Debugger() { std::cerr << endl;} private: bool first; std::string separator; }; template <typename T1, typename T2> inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p) { return os << "(" << p.first << ", " << p.second << ")"; } template<typename T> inline std::ostream &operator << (std::ostream & os,const std::vector<T>& v) { bool first = true; os << "["; for(unsigned int i = 0; i < v.size(); i++) { if(!first) os << ", "; os << v[i]; first = false; } return os << "]"; } template<typename T> inline std::ostream &operator << (std::ostream & os,const std::set<T>& v) { bool first = true; os << "["; for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii) { if(!first) os << ", "; os << *ii; first = false; } return os << "]"; } template<typename T1, typename T2> inline std::ostream &operator << (std::ostream & os,const std::map<T1, T2>& v) { bool first = true; os << "["; for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii) { if(!first) os << ", "; os << *ii ; first = false; } return os << "]"; }
#else
		#define debug(args...)
#endif

int n,t1,t2;

int comp(pnt p1,pnt p2){

	return arg(p1) < arg(p2);

}

int main(){

	cin>>n;

	if(n==1){
		cout<<0.000<<endl;
		return 0;
	}

	vector<pnt> v;

	rep(i,n){
		cin>>t1>>t2;
		v.pb(pnt(t1,t2));
	}

	sort(all(v),comp);

	double d=-inf;

	vector<double> vv;

	rep(i,n)vv.pb(arg(v[i])*180/PI);

	vector<double> ans;

	rep(i,n-1){
		ans.pb(vv[i+1]-vv[i]);
	}

	ans.pb(360-vv.back()+vv[0]);

	d=*max_element(all(ans));

	//~ rep(i,len(v)){
		//~ t1=i;
		//~ t2=(i+1)%len(v);
		//~ double dd=(180.0*(arg(v[t2])-arg(v[t1]))/PI);
		//~ if(dd<0)dd+=360.0;
		//~ d=max(d,dd);
	//~ }

	printf("%.10lf",360.0-d);

}


#include <iostream>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;

const double PI = acos(-1);

struct Point {
    int x, y;
};

vector<double> angles(const vector<Point>& pts) {
    vector<double> a;
    for (const auto& pt : pts) {
        a.push_back(atan2(pt.y, pt.x));
    }
    return a;
}

int main(int argc, const char* argv[]) {
    int n;
    cin >> n;
    vector<Point> pts(n);
    for (auto& pt : pts) {
        cin >> pt.x >> pt.y;
    }

    vector<double> a(angles(pts));
    sort(a.begin(), a.end());

    double ans = 0;
    for (int i = 0; i < n; ++i) {
        double inner = i > 0 ? a[i] - a[i - 1] : a[i] - a[n - 1] + 2 * PI;
        ans = max(ans, inner);
    }

    if (ans < 1e-12) {
        cout << 0 << endl;
    } else {
        cout << (2 * PI - ans) / PI * 180 << endl;
    }

    return 0;
}


#include <iostream>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;

const double PI = acos(-1);

struct Point {
    int x, y;
};

vector<double> angles(const vector<Point>& pts) {
    vector<double> a;
    for (const auto& pt : pts) {
        a.push_back(atan2(pt.y, pt.x));
    }
    return a;
}

int main(int argc, const char* argv[]) {
    int n;
    cin >> n;
    vector<Point> pts(n);
    for (auto& pt : pts) {
        cin >> pt.x >> pt.y;
    }

    vector<double> a(angles(pts));
    sort(a.begin(), a.end());

    double ans = 0;
    for (int i = 0; i < n; ++i) {
        double inner = i > 0 ? a[i] - a[i - 1] : a[i] - a[n - 1] + 2 * PI;
        ans = max(ans, inner);
    }

    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(7);
    if (ans < 1e-12) {
        cout << 0 << endl;
    } else {
        cout << (2 * PI - ans) / PI * 180 << endl;
    }

    return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <stack>
#include <queue>
#include <string>
#include <vector>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <iostream>
#include <algorithm>

using namespace std;

#define M_PI 3.141592654

string toStr(int n) {
    stringstream ss;
    ss << n;
    return ss.str();
}

int main() {
    int N;
    cin >> N;

    vector<pair<int, int> > p(N, pair<int, int>());
    for(int i = 0; i < N; i++) {
        cin >> p[i].first >> p[i].second;
    }

    vector<double> a(N, 0);
    for(int i = 0; i < N; i++) {
        a[i] = atan2(0 - p[i].second, 0 - p[i].first);
        if(a[i] < 0.0)
            a[i] += 2.0*M_PI;
    }

    sort(a.begin(), a.end());

    double maxAngle = 2*M_PI+a[0]-a[a.size()-1];
    for(int i = 1; i < a.size(); i++) {
        maxAngle = max(a[i]-a[i-1], maxAngle);
    }

    printf("%.9f\n", (2*M_PI-maxAngle)*180/M_PI);
    return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <stack>
#include <queue>
#include <string>
#include <vector>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <iostream>
#include <algorithm>

using namespace std;

string toStr(int n) {
    stringstream ss;
    ss << n;
    return ss.str();
}

int main() {
    int N;
    cin >> N;

    vector<pair<int, int> > p(N, pair<int, int>());
    for(int i = 0; i < N; i++) {
        cin >> p[i].first >> p[i].second;
    }

    vector<double> a(N, 0);
    for(int i = 0; i < N; i++) {
        a[i] = atan2(0 - p[i].second, 0 - p[i].first);
        if(a[i] < 0.0)
            a[i] += 2.0*M_PI;
    }

    sort(a.begin(), a.end());

    double maxAngle = 2*M_PI+a[0]-a[a.size()-1];
    for(int i = 1; i < a.size(); i++) {
        maxAngle = max(a[i]-a[i-1], maxAngle);
    }

    printf("%.9f\n", (2*M_PI-maxAngle)*180/M_PI);
    return 0;
}


//Name         : Shinchan Nohara
//Age          : 5 years
//Organisation : Kasukabe Defense Force

#include <iostream>
#include <ctime>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <cassert>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <iterator>
#include <fstream>
using namespace std;

typedef long long 		int64;
typedef vector<int> 		vi;
typedef string 			ST;
typedef stringstream 		SS;
typedef vector< vector<int> > 	vvi;
typedef pair<int,int> 		ii;
typedef vector<string> 		vs;
/*
#if __cplusplus > 199711L	// for g++0x, value of __cplusplus must be greater thana 199711L.
	#define tr(i, c)	for(auto i = begin(c); i != end(c); i++)
#else
	#define tr(i, c)	for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#endif
*/
#define DEBUG(x)	cout << #x << " = " << x << "\n"
#define endl		("\n")
#define tr(i, c)	for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
//#define PI		M_PI
#define E 		M_E
#define	ep		1e-9

#define	Sf		scanf
#define	Pf		printf

#define forn(i, n)	for(int i = 0, lets_stop_here = (int)n; i <  lets_stop_here; i++)
#define forab(i, a, b)	for(int i = a, lets_stop_here = (int)b; i <= lets_stop_here; i++)
#define rep(i, a, b)	for(int i = a, lets_stop_here = (int)b; i >= lets_stop_here; i--)

#define	all(c)		(c).begin(), (c).end()
#define	CL(a, b)	memset(a, b, sizeof(a))
#define mp		make_pair
#define pb		push_back

#define	present(x, c)	((c).find(x) != (c).end())	//map & set//
#define	cpresent(x, c)	(find( (c).begin(), (c).end(), x) != (c).end())	//vector & list//

#define read(n)		scanf("%d", &n)
#define write(n)	printf("%d ", n)
#define writeln(n)	printf("%d\n", n)
// /*
#ifdef DEBUG
	#undef DEBUG
#endif
#define DEBUG
// */

const  long double PI = 2*acos(0);

long double radToDeg(long double d) {
	long double ret = 180.0 * d / PI;
	if(ret < 0 )
		ret += 360;
	return ret;
}

const int sz = 1e5 + 111;
int X[sz], Y[sz];
long double ang[sz];

int main()
{
//	DEBUG(M_PI);
	int N;
	read(N);

	forn(i, N) {
		Sf("%d %d", &X[i], &Y[i]);
		if(Y[i] == 0) {
			ang[i] = X[i] > 0 ? 0 : 180;
		}
		else
			ang[i] = radToDeg(atan2(Y[i], X[i]));
//		cout << X[i] << " " << Y[i] << ": "  << ang[i] << endl;
	}
	sort(ang, ang+N);

	if(N == 1) {
		cout << 0 << endl;
		return 0;
	}

	long double ans = 360;
	forab(i, 1, N-1) {
		long double t = 360 - (ang[i] - ang[i-1]);
//		DEBUG(t);
		ans = min(ans, 360.0 - (ang[i] - ang[i-1]));
	}
	long double t;
	//t = 360.0 + ang[0] - ang[N-1];

//	t = 360.0 - t;
	t = ang[N-1] - ang[0];
//	DEBUG(t);
	ans = min(ans, t);
	DEBUG(ans);
	Pf("%0.10lf\n", (double) ans);

	return 0;
}


//Name         : Shinchan Nohara
//Age          : 5 years
//Organisation : Kasukabe Defense Force

#include <iostream>
#include <ctime>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <cassert>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <iterator>
#include <fstream>
using namespace std;

typedef long long 		int64;
typedef vector<int> 		vi;
typedef string 			ST;
typedef stringstream 		SS;
typedef vector< vector<int> > 	vvi;
typedef pair<int,int> 		ii;
typedef vector<string> 		vs;
/*
#if __cplusplus > 199711L	// for g++0x, value of __cplusplus must be greater thana 199711L.
	#define tr(i, c)	for(auto i = begin(c); i != end(c); i++)
#else
	#define tr(i, c)	for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#endif
*/
#define DEBUG(x)	cout << #x << " = " << x << "\n"
#define endl		("\n")
#define tr(i, c)	for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define PI		M_PI
#define E 		M_E
#define	ep		1e-9

#define	Sf		scanf
#define	Pf		printf

#define forn(i, n)	for(int i = 0, lets_stop_here = (int)n; i <  lets_stop_here; i++)
#define forab(i, a, b)	for(int i = a, lets_stop_here = (int)b; i <= lets_stop_here; i++)
#define rep(i, a, b)	for(int i = a, lets_stop_here = (int)b; i >= lets_stop_here; i--)

#define	all(c)		(c).begin(), (c).end()
#define	CL(a, b)	memset(a, b, sizeof(a))
#define mp		make_pair
#define pb		push_back

#define	present(x, c)	((c).find(x) != (c).end())	//map & set//
#define	cpresent(x, c)	(find( (c).begin(), (c).end(), x) != (c).end())	//vector & list//

#define read(n)		scanf("%d", &n)
#define write(n)	printf("%d ", n)
#define writeln(n)	printf("%d\n", n)
// /*
#ifdef DEBUG
	#undef DEBUG
#endif
#define DEBUG
// */

long double radToDeg(long double d) {
	long double ret = 180.0 * d / M_PI;
	if(ret < 0 )
		ret += 360;
	return ret;
}

const int sz = 1e5 + 111;
int X[sz], Y[sz];
long double ang[sz];

int main()
{
//	DEBUG(PI);
	int N;
	read(N);

	forn(i, N) {
		Sf("%d %d", &X[i], &Y[i]);
		if(Y[i] == 0) {
			ang[i] = X[i] > 0 ? 0 : 180;
		}
		else
			ang[i] = radToDeg(atan2(Y[i], X[i]));
//		cout << X[i] << " " << Y[i] << ": "  << ang[i] << endl;
	}
	sort(ang, ang+N);

	if(N == 1) {
		cout << 0 << endl;
		return 0;
	}

	long double ans = 360;
	forab(i, 1, N-1) {
		long double t = 360 - (ang[i] - ang[i-1]);
//		DEBUG(t);
		ans = min(ans, 360.0 - (ang[i] - ang[i-1]));
	}
	long double t;
	//t = 360.0 + ang[0] - ang[N-1];

//	t = 360.0 - t;
	t = ang[N-1] - ang[0];
//	DEBUG(t);
	ans = min(ans, t);
	DEBUG(ans);
	Pf("%0.10lf\n", (double) ans);

	return 0;
}


//Name         : Shinchan Nohara
//Age          : 5 years
//Organisation : Kasukabe Defense Force

#include <iostream>
#include <ctime>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <cassert>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <iterator>
#include <fstream>
using namespace std;

typedef long long 		int64;
typedef vector<int> 		vi;
typedef string 			ST;
typedef stringstream 		SS;
typedef vector< vector<int> > 	vvi;
typedef pair<int,int> 		ii;
typedef vector<string> 		vs;
/*
#if __cplusplus > 199711L	// for g++0x, value of __cplusplus must be greater thana 199711L.
	#define tr(i, c)	for(auto i = begin(c); i != end(c); i++)
#else
	#define tr(i, c)	for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#endif
*/
#define DEBUG(x)	cout << #x << " = " << x << "\n"
#define endl		("\n")
#define tr(i, c)	for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define PI		M_PI
#define E 		M_E
#define	ep		1e-9

#define	Sf		scanf
#define	Pf		printf

#define forn(i, n)	for(int i = 0, lets_stop_here = (int)n; i <  lets_stop_here; i++)
#define forab(i, a, b)	for(int i = a, lets_stop_here = (int)b; i <= lets_stop_here; i++)
#define rep(i, a, b)	for(int i = a, lets_stop_here = (int)b; i >= lets_stop_here; i--)

#define	all(c)		(c).begin(), (c).end()
#define	CL(a, b)	memset(a, b, sizeof(a))
#define mp		make_pair
#define pb		push_back

#define	present(x, c)	((c).find(x) != (c).end())	//map & set//
#define	cpresent(x, c)	(find( (c).begin(), (c).end(), x) != (c).end())	//vector & list//

#define read(n)		scanf("%d", &n)
#define write(n)	printf("%d ", n)
#define writeln(n)	printf("%d\n", n)
// /*
#ifdef DEBUG
	#undef DEBUG
#endif
#define DEBUG
// */

long double radToDeg(long double d) {
	long double ret = 180.0 * d / M_PI;
	if(ret < 0 )
		ret += 360;
	return ret;
}

const int sz = 1e5 + 111;
int X[sz], Y[sz];
long double ang[sz];

int main()
{
	DEBUG(PI);
	int N;
	read(N);

	forn(i, N) {
		Sf("%d %d", &X[i], &Y[i]);
		if(Y[i] == 0) {
			ang[i] = X[i] > 0 ? 0 : 180;
		}
		else
			ang[i] = radToDeg(atan2(Y[i], X[i]));
//		cout << X[i] << " " << Y[i] << ": "  << ang[i] << endl;
	}
	sort(ang, ang+N);

	if(N == 1) {
		cout << 0 << endl;
		return 0;
	}

	long double ans = 360;
	forab(i, 1, N-1) {
		long double t = 360 - (ang[i] - ang[i-1]);
		DEBUG(t);
		ans = min(ans, 360 - (ang[i] - ang[i-1]));
	}
	long double t = 360 + ang[0] - ang[N-1];
	t = 360 - t;
	DEBUG(t);
	ans = min(ans, t);
	DEBUG(ans);
	Pf("%0.10lf\n", (double) ans);

	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <ctype.h>
#include <queue>
#include <vector>
#include <algorithm>
#include <stdio.h>
#define File_in(input) freopen(input, "r", stdin)
#define File_out(output) freopen(output, "w", stdout)
#define all(x) x.begin(),x.end()
#define for_in(x) for (auto it: x)
#define FOR(i,b,n) for(int i=b; i<=n; i++)
#define RFOR(i,n,b) for(int i=n; i>=b; i--)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair <int,int> point;
const int MAX_SIZE = 1e6+10;
const int MOD = 1000000007;
const int INF = 114748364;

double a (double xx, double yy) {
    double pi = acos(-1);
    double res = atan2(xx,yy);
    if (res < 0)
        res+=2*pi;
    return res;
}
double toDeg(double value) {
    double res = 180.0*value/acos(-1);
    return res;
}

int main () {
    ios_base::sync_with_stdio(false);
    //File_in("input.txt"); File_out("output.txt");
    int n;
    cin >> n;
    vector <double> c;
    for (int i = 0; i < n; i++) {
        double x,y;
        cin >> x >> y;
        c.push_back(a(x,y));
    }
    sort(all(c));
    double ans = c[0] - c[n-1] + 2*acos(-1);
    for (int i = 0; i < n -1; i++) {

        ans = max(ans,c[i+1]-c[i]);
    }
    printf("%.12f",toDeg(2*acos(-1) - ans));
}


#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <ctype.h>
#include <queue>
#include <vector>
#include <algorithm>
#include <stdio.h>
#define File_in(input) freopen(input, "r", stdin)
#define File_out(output) freopen(output, "w", stdout)
#define all(x) x.begin(),x.end()
#define for_in(x) for (auto it: x)
#define FOR(i,b,n) for(int i=b; i<=n; i++)
#define RFOR(i,n,b) for(int i=n; i>=b; i--)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair <int,int> point;
const int MAX_SIZE = 1e6+10;
const int MOD = 1000000007;
const int INF = 114748364;

double a (double xx, double yy) {
    double pi = acos(-1);
    double res = atan2(xx,yy);
    if (res < 0)
        res+=2*pi;
    return res;
}
double toDeg(double value) {
    double res = 180.0*value/acos(-1);
    return res;
}

int main () {
    ios_base::sync_with_stdio(false);
    //File_in("input.txt"); File_out("output.txt");
    int n;
    cin >> n;
    vector <double> c;
    for (int i = 0; i < n; i++) {
        double x,y;
        cin >> x >> y;
        c.push_back(a(x,y));
    }
    sort(all(c));
    double ans = c[0]- c[n-1] + acos(-1);
    for (int i = 0; i < n -1; i++) {

        ans = max(ans,c[i+1]-c[i]);
    }
    printf("%.12f",360.0 - toDeg(ans));
}


#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <ctype.h>
#include <queue>
#include <vector>
#include <algorithm>
#include <stdio.h>
#define File_in(input) freopen(input, "r", stdin)
#define File_out(output) freopen(output, "w", stdout)
#define all(x) x.begin(),x.end()
#define for_in(x) for (auto it: x)
#define FOR(i,b,n) for(int i=b; i<=n; i++)
#define RFOR(i,n,b) for(int i=n; i>=b; i--)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair <int,int> point;
const int MAX_SIZE = 1e6+10;
const int MOD = 1000000007;
const int INF = 114748364;

double a (double xx, double yy) {
    double pi = acos(-1);
    double res = atan2(xx,yy);
    if (res < 0)
        res+=2*pi;
    return res;
}
double toDeg(double value) {
    double res = 180.0*value/acos(-1);
    return res;
}

int main () {
    ios_base::sync_with_stdio(false);
    //File_in("input.txt"); File_out("output.txt");
    int n;
    cin >> n;
    vector <double> c;
    for (int i = 0; i < n; i++) {
        double x,y;
        cin >> x >> y;
        c.push_back(a(x,y));
    }
    sort(all(c));
    double ans = c[0]- c[1] + acos(-1);
    for (int i = 0; i < n -1; i++) {

        ans = max(ans,c[i+1]-c[i]);
    }
    printf("%.12f",360.0 - toDeg(ans));
}


#include <bits/stdc++.h>
#include <math.h>

using namespace std;
using namespace __gnu_cxx;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,b,a) for(int i=(a);i>=(b);i--)
#define mp make_pair
#define pb push_back
#define oo (1<<30)
#define sz(v) (int)v.size()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define mem(s,v) memset(s,v,sizeof(s))
#define ppc(x) __builtin_popcount((x))
#define iter(it,s) for(__typeof(s.begin())it = s.begin();it!=s.end();it++)

typedef complex<double> point;
#define EPS 1e-9
#define X real()
#define Y imag()
#define vec(a,b) ((b)-(a))
#define dot(a,b) ((conj(a)*(b)).real())
#define lengthSqr(v) (dot(v,v))
#define same(a,b) (lengthSqr(vec(a,b))<EPS)
#define cross(a,b) ((conj(a)*(b)).imag())
#define length(v) ((double)hypot((v).Y,(v).X))
#define OO 1e9
#define polar(r,t) ((r)*exp(point(0,(t))))
#define angle(v) (atan2((v).Y,(v).X))
#define rotate(v,t) (polar(v,t))
#define rotateabout(v,t,a)  (rotate(vec(a,v),t)+(a))
#define reflect(p,m) ((conj((p)/(m)))*(m))
#define normalize(p) ((p)/length(p))
#define mid(a,b) (((a)+(b))/point(2,0))
#define perp(a) (point(-(a).Y,(a).X))
#define colliner pointOnLine

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<string> vs;
typedef pair<int, int> pi;
typedef vector<pi> vpi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

struct cmp {
  point about;
  cmp(point c) {
    about = c;
  }
  bool operator()(const point& p, const point& q) const {
    double cr = cross(vec(about,p),vec(about,q));
    if (fabs(cr) < EPS)
      return make_pair(p.Y, p.X) < make_pair(q.Y, q.X);
    return cr > 0;
  }
};

void sortAntiClockWise(vector<point>& pnts) {
  point mn(1 / 0.0, 1 / 0.0);
  for (int i = 0; i < sz(pnts); i++)
    if (make_pair(pnts[i].Y, pnts[i].X) < make_pair(mn.Y, mn.X))
      mn = pnts[i];
  sort(all(pnts),cmp(mn)) ;
}

#define pi 3.14159265358979323846

int main() {
#ifndef ONLINE_JUDGE
	freopen("test.in", "rt", stdin);
//	freopen("o.txt", "wt", stdout);
#endif
	ios::sync_with_stdio(0);
	int n;
	cin >> n;
	if (n == 1) {
	  cout << 0 << endl;
	  return 0;
	}
	vector <point> v(n);
	FOR (i , 0 , n) {
	  double x, y;
	  cin >> x >> y;
	  v[i] = point(x, y);
	}
	sortAntiClockWise(v);
	double res = 0;
	FOR (i , 0 , sz(v)) {
	  int j = (i + 1) % n;
	  double a = hypot(v[i].X, v[i].Y), b = hypot(v[j].X, v[j].Y);
	  double c = hypot(v[i].X - v[j].X, v[i].Y - v[j].Y);
	  double ang = 180 * acos((a * a + b * b - c * c) / (2 * a * b)) / pi;
	  if (cross(v[i], v[j]) < 0)
	    ang = 360.0 - ang;
	  res = max (res, ang);
	}
	if (fabs(res) < 1e-11)
	  res = 360;
	printf ("%lf\n", 360.0 - res);
	return 0;
}


#include <bits/stdc++.h>
#include <math.h>

using namespace std;
using namespace __gnu_cxx;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,b,a) for(int i=(a);i>=(b);i--)
#define mp make_pair
#define pb push_back
#define oo (1<<30)
#define sz(v) (int)v.size()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define mem(s,v) memset(s,v,sizeof(s))
#define ppc(x) __builtin_popcount((x))
#define iter(it,s) for(__typeof(s.begin())it = s.begin();it!=s.end();it++)

typedef complex<double> point;
#define EPS 1e-9
#define X real()
#define Y imag()
#define vec(a,b) ((b)-(a))
#define dot(a,b) ((conj(a)*(b)).real())
#define lengthSqr(v) (dot(v,v))
#define same(a,b) (lengthSqr(vec(a,b))<EPS)
#define cross(a,b) ((conj(a)*(b)).imag())
#define length(v) ((double)hypot((v).Y,(v).X))
#define OO 1e9
#define polar(r,t) ((r)*exp(point(0,(t))))
#define angle(v) (atan2((v).Y,(v).X))
#define rotate(v,t) (polar(v,t))
#define rotateabout(v,t,a)  (rotate(vec(a,v),t)+(a))
#define reflect(p,m) ((conj((p)/(m)))*(m))
#define normalize(p) ((p)/length(p))
#define mid(a,b) (((a)+(b))/point(2,0))
#define perp(a) (point(-(a).Y,(a).X))
#define colliner pointOnLine

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<string> vs;
typedef pair<int, int> pi;
typedef vector<pi> vpi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

struct cmp {
  point about;
  cmp(point c) {
    about = c;
  }
  bool operator()(const point& p, const point& q) const {
    double cr = cross(vec(about,p),vec(about,q));
    if (fabs(cr) < EPS)
      return make_pair(p.Y, p.X) < make_pair(q.Y, q.X);
    return cr > 0;
  }
};

void sortAntiClockWise(vector<point>& pnts) {
  point mn(1 / 0.0, 1 / 0.0);
  for (int i = 0; i < sz(pnts); i++)
    if (make_pair(pnts[i].Y, pnts[i].X) < make_pair(mn.Y, mn.X))
      mn = pnts[i];
  sort(all(pnts),cmp(mn)) ;
}

#define pi 3.14159265358979323846

int main() {
#ifndef ONLINE_JUDGE
	freopen("test.in", "rt", stdin);
//	freopen("o.txt", "wt", stdout);
#endif
	int n;
	cin >> n;
	if (n == 1) {
	  cout << 0 << endl;
	  return 0;
	}
	vector <point> v(n);
	FOR (i , 0 , n) {
	  double x, y;
	  cin >> x >> y;
	  v[i] = point(x, y);
	}
	sortAntiClockWise(v);
	double res = 0;
	FOR (i , 0 , sz(v)) {
	  int j = (i + 1) % n;
	  double a = hypot(v[i].X, v[i].Y), b = hypot(v[j].X, v[j].Y);
	  double c = hypot(v[i].X - v[j].X, v[i].Y - v[j].Y);
	  double ang = 180 * acos((a * a + b * b - c * c) / (2 * a * b)) / pi;
	  if (cross(v[i], v[j]) < 0)
	    ang = 360.0 - ang;
	  res = max (res, ang);
	}
	if (fabs(res) < 1e-9)
	  res = 360;
	printf ("%lf\n", 360.0 - res);
	return 0;
}


#include <bits/stdc++.h>
#include <math.h>

using namespace std;
using namespace __gnu_cxx;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,b,a) for(int i=(a);i>=(b);i--)
#define mp make_pair
#define pb push_back
#define oo (1<<30)
#define sz(v) (int)v.size()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define mem(s,v) memset(s,v,sizeof(s))
#define ppc(x) __builtin_popcount((x))
#define iter(it,s) for(__typeof(s.begin())it = s.begin();it!=s.end();it++)

typedef complex<double> point;
#define EPS 1e-9
#define X real()
#define Y imag()
#define vec(a,b) ((b)-(a))
#define dot(a,b) ((conj(a)*(b)).real())
#define lengthSqr(v) (dot(v,v))
#define same(a,b) (lengthSqr(vec(a,b))<EPS)
#define cross(a,b) ((conj(a)*(b)).imag())
#define length(v) ((double)hypot((v).Y,(v).X))
#define OO 1e9
#define polar(r,t) ((r)*exp(point(0,(t))))
#define angle(v) (atan2((v).Y,(v).X))
#define rotate(v,t) (polar(v,t))
#define rotateabout(v,t,a)  (rotate(vec(a,v),t)+(a))
#define reflect(p,m) ((conj((p)/(m)))*(m))
#define normalize(p) ((p)/length(p))
#define mid(a,b) (((a)+(b))/point(2,0))
#define perp(a) (point(-(a).Y,(a).X))
#define colliner pointOnLine

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<string> vs;
typedef pair<int, int> pi;
typedef vector<pi> vpi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

#define PI 3.14159265358979323846

int main() {
#ifndef ONLINE_JUDGE
	freopen("test.in", "rt", stdin);
//	freopen("o.txt", "wt", stdout);
#endif
	ios::sync_with_stdio(0);
	int n;
	cin >> n;
	vd v;
	FOR (i , 0 , n) {
	  double x, y;
	  cin >> x >> y;
	  double z = atan2(y, x) * 180 / PI;
	  if (z < 0)
	    z += 360;
	  v.pb(z);
	}
	sort (all(v));
	double res = 0;
	FOR (i , 1 , sz(v))
	  res = max (res, v[i] - v[i - 1]);
	res = max (res, 360 - (v[sz(v) - 1] - v[0]));
	printf ("%lf\n", 360 - res);
	return 0;
}


#include <bits/stdc++.h>
#include <math.h>

using namespace std;
using namespace __gnu_cxx;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,b,a) for(int i=(a);i>=(b);i--)
#define mp make_pair
#define pb push_back
#define oo (1<<30)
#define sz(v) (int)v.size()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define mem(s,v) memset(s,v,sizeof(s))
#define ppc(x) __builtin_popcount((x))
#define iter(it,s) for(__typeof(s.begin())it = s.begin();it!=s.end();it++)

typedef complex<double> point;
#define EPS 1e-9
#define X real()
#define Y imag()
#define vec(a,b) ((b)-(a))
#define dot(a,b) ((conj(a)*(b)).real())
#define lengthSqr(v) (dot(v,v))
#define same(a,b) (lengthSqr(vec(a,b))<EPS)
#define cross(a,b) ((conj(a)*(b)).imag())
#define length(v) ((double)hypot((v).Y,(v).X))
#define OO 1e9
#define polar(r,t) ((r)*exp(point(0,(t))))
#define angle(v) (atan2((v).Y,(v).X))
#define rotate(v,t) (polar(v,t))
#define rotateabout(v,t,a)  (rotate(vec(a,v),t)+(a))
#define reflect(p,m) ((conj((p)/(m)))*(m))
#define normalize(p) ((p)/length(p))
#define mid(a,b) (((a)+(b))/point(2,0))
#define perp(a) (point(-(a).Y,(a).X))
#define colliner pointOnLine

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<string> vs;
typedef pair<int, int> pi;
typedef vector<pi> vpi;

int dx[] = { 0, 0, 1, -1 };
int dy[] = { 1, -1, 0, 0 };

struct cmp {
  point about;
  cmp(point c) {
    about = c;
  }
  bool operator()(const point& p, const point& q) const {
    double cr = cross(vec(about,p),vec(about,q));
    if (fabs(cr) < EPS)
      return make_pair(p.Y, p.X) < make_pair(q.Y, q.X);
    return cr > 0;
  }
};

void sortAntiClockWise(vector<point>& pnts) {
  point mn(1 / 0.0, 1 / 0.0);
  for (int i = 0; i < sz(pnts); i++)
    if (make_pair(pnts[i].Y, pnts[i].X) < make_pair(mn.Y, mn.X))
      mn = pnts[i];
  sort(all(pnts),cmp(mn)) ;
}

#define pi 3.14159265358979323846

int main() {
#ifndef ONLINE_JUDGE
	freopen("test.in", "rt", stdin);
//	freopen("o.txt", "wt", stdout);
#endif
	ios::sync_with_stdio(0);
	int n;
	cin >> n;
	if (n == 1) {
	  cout << 0 << endl;
	  return 0;
	}
	vector <point> v(n);
	FOR (i , 0 , n) {
	  double x, y;
	  cin >> x >> y;
	  v[i] = point(x, y);
	}
	sortAntiClockWise(v);
	double res = 0;
	FOR (i , 0 , sz(v)) {
	  int j = (i + 1) % n;
	  double a = hypot(v[i].X, v[i].Y), b = hypot(v[j].X, v[j].Y);
	  double c = hypot(v[i].X - v[j].X, v[i].Y - v[j].Y);
	  double ang = 180 * acos((a * a + b * b - c * c) / (2 * a * b)) / pi;
	  if (cross(v[i], v[j]) < 0)
	    ang = 360.0 - ang;
	  res = max (res, ang);
	}
	if (fabs(res) < 1e-9)
	  res = 360;
	printf ("%lf\n", 360.0 - res);
	return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return angle;
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0, curAng;

    if(size1 > 0){
        tot += fabs(getAngle(firstHalf[0], firstHalf[size1 -1]));
    }
    if(size2 > 0){
        tot += fabs(getAngle(secondHalf[0], secondHalf[size2 -1]));
    }

    if(size1 > 0 && size2 > 0){
        double ang1 = fabs(getAngle(firstHalf[0], secondHalf[size2 -1]));
        double ang2 = getAngle(firstHalf[size1 - 1], secondHalf[0]);
        tot += min(ang1, ang2);
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return fabs(angle);
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0;

    if(size1 > 0){
        tot += getAngle(firstHalf[0], firstHalf[size1 -1]);
    }
    if(size2 > 0){
        tot += getAngle(secondHalf[0], secondHalf[size2 -1]);
    }

    if(size1 > 0 && size2 > 0){
        tot += min(getAngle(firstHalf[0], secondHalf[size2 -1]), getAngle(firstHalf[size1 - 1], secondHalf[0]));
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return fabs(angle);
}

bool cmp(const point &p1, const point &p2){

    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    return (ang1 < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }

    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0;

    if(size1 > 0){
        tot += getAngle(firstHalf[0], firstHalf[size1 -1]);
    }
    if(size2 > 0){
        tot += getAngle(secondHalf[0], secondHalf[size2 -1]);
    }

    if(size1 > 0 && size2 > 0){
        tot += min(getAngle(firstHalf[0], secondHalf[0]), getAngle(firstHalf[size1 - 1], secondHalf[size2 -1]));
    }

    printf("%.15lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return angle;
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0, curAng;

    if(size1 > 0){
        tot += fabs(getAngle(firstHalf[0], firstHalf[size1 -1]));
    }
    if(size2 > 0){
        tot += fabs(getAngle(secondHalf[0], secondHalf[size2 -1]));
    }

    if(size1 > 0 && size2 > 0){
        double ang1 = getAngle(firstHalf[0], secondHalf[size2 -1]);
        if(ang1 > 0) ang1 = 360 - ang1;
        else ang1 = fabs(ang1);
        double ang2 = getAngle(firstHalf[size1 - 1], secondHalf[0]);
        if(ang1 < 0) ang1 += 360;

        tot += min(ang1, ang2);
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    if(angle < 0) angle += 360;
    return angle;
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> v;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        v.push_back(p);
    }

    sort(v.begin(), v.end(), cmp);

    double maxi = 0.0;

    for(int i = 1; i < n; i++){
        //cout << v[i-1] << endl;
        maxi = max(maxi, getAngle(v[i-1], v[i]));
    }
    maxi = max(maxi, getAngle(v[v.size() - 1], v[0]));

    printf("%lf", 360 - maxi);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    if(angle < 0) angle += 360;
    return angle;
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> v;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        v.push_back(p);
    }

    sort(v.begin(), v.end(), cmp);

    double maxi = 0.0;

    for(int i = 1; i < n; i++){
        //cout << v[i-1] << endl;
        maxi = max(maxi, getAngle(v[i-1], v[i]));
    }
    maxi = max(maxi, getAngle(v[v.size() - 1], v[0]));

    double ans;

    if(maxi == 0.0){
        ans = 0.0;
    }else{
        ans = 360 - maxi;
    }

    printf("%lf", ans );

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return fabs(angle);
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;
    return (ang1 < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0;

    if(size1 > 0){
        tot += getAngle(firstHalf[0], firstHalf[size1 -1]);
    }
    if(size2 > 0){
        tot += getAngle(secondHalf[0], secondHalf[size2 -1]);
    }

    if(size1 > 0 && size2 > 0){
        tot += min(getAngle(firstHalf[0], secondHalf[size2 -1]), getAngle(firstHalf[size1 - 1], secondHalf[0]));
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return angle;
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0, curAng;

    if(size1 > 0){
        double ang1 = getAngle(firstHalf[0], firstHalf[size1 -1]);
        if(ang1 < 0){
            ang1 += 360;
        }
        tot += ang1;
    }
    if(size2 > 0){
        double ang2 = getAngle(secondHalf[0], secondHalf[size2 -1]);
        if(ang2 > 0){
            ang2 = 360 - ang2;
        }else{
            ang2 = fabs(ang2);
        }
        tot += ang2;
    }

    if(size1 > 0 && size2 > 0){
        double ang1 = getAngle(firstHalf[0], secondHalf[size2 -1]);
        if(ang1 > 0) ang1 = 360 - ang1;
        else ang1 = fabs(ang1);
        double ang2 = getAngle(firstHalf[size1 - 1], secondHalf[0]);
        if(ang2 < 0) ang2 += 360;

        tot += min(ang1, ang2);
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return fabs(angle);
}

bool cmp(const point &p1, const point &p2){

    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(isnan(ang1)){
        cout << p1;
        return 0;
    }
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(isnan(ang2)){
        cout << p2;
        return 0;
    }
    return (ang1 < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0;

    if(size1 > 0){
        tot += getAngle(firstHalf[0], firstHalf[size1 -1]);
    }
    if(size2 > 0){
        tot += getAngle(secondHalf[0], secondHalf[size2 -1]);
    }

    if(size1 > 0 && size2 > 0){
        tot += min(getAngle(firstHalf[0], secondHalf[size2 -1]), getAngle(firstHalf[size1 - 1], secondHalf[0]));
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return angle;
}

bool cmp(const point &p1, const point &p2){
    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    if(ang1 < 0) ang1 += 360;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    if(ang2 < 0) ang2 += 360;

    return (ang1 + EPS < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }
    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0, curAng;

    if(size1 > 0){
        tot += fabs(getAngle(firstHalf[0], firstHalf[size1 -1]));
    }
    if(size2 > 0){
        tot += fabs(getAngle(secondHalf[0], secondHalf[size2 -1]));
    }

    if(size1 > 0 && size2 > 0){
        double ang1 = getAngle(firstHalf[0], secondHalf[size2 -1]);
        if(ang1 > 0) ang1 = 360 - ang1;
        else ang1 = fabs(ang1);
        double ang2 = getAngle(firstHalf[size1 - 1], secondHalf[0]);
        if(ang2 < 0) ang2 += 360;

        tot += min(ang1, ang2);
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return fabs(angle);
}

bool cmp(const point &p1, const point &p2){

    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    return (ang1 < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }

    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0;

    if(size1 > 0){
        tot += getAngle(firstHalf[0], firstHalf[size1 -1]);
    }
    if(size2 > 0){
        tot += getAngle(secondHalf[0], secondHalf[size2 -1]);
    }

    if(size1 > 0 && size2 > 0){
        tot += min(getAngle(firstHalf[0], secondHalf[0]), getAngle(firstHalf[size1 - 1], secondHalf[size2 -1]));
    }

    printf("%lf", tot);

    return 0;
}


#include <vector>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <map>
#include <complex>
#include <ctime>

using namespace std;

typedef complex<double> point;

#define EPS 1e-9
#define X real()
#define Y imag()
#define dot(a, b) ((conj(a)*(b)).X)
#define cross(a, b) ((conj(a) * (b)).Y)
#define vec(a, b) ((b)-(a))

const double PI = 2*acos(0.0);

double getAngle(const point &p1, const point &p2){
    double y = cross(p1 , p2);
    double x = dot(p1, p2);
    double angle = atan2(y , x) * 180 / PI;
    return fabs(angle);
}

bool cmp(const point &p1, const point &p2){

    double ang1 = atan2(p1.Y, p1.X) * 180 / PI;
    double ang2 = atan2(p2.Y, p2.X) * 180 / PI;
    return (ang1 < ang2);
}

vector<point> firstHalf;
vector<point> secondHalf;

int main()
{
    /**
    freopen("in.in", "w", stdout);
    srand(time(NULL));
    int q = 100000;
    printf("%d\n", q);
    for(int i = 0; i < q; i++){
        printf("%d %d\n", rand() * (rand() & 1 ? 1 : -1 ), rand() * (rand() & 1 ? 1 : -1 ) );
    }
    return 0;**/
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
#endif
    int n, a, b;
    scanf("%d", &n);

    if(n == 1){
        cout << 0.0;
        return 0;
    }

    firstHalf.reserve(100005);
    secondHalf.reserve(100005);

    int x = n;

    while(x--){
        point p;
        scanf("%d %d", &a, &b);
        p.real(a);
        p.imag(b);
        if(b < 0){
            secondHalf.push_back(p);
        }else{
            firstHalf.push_back(p);
        }

    }

    sort(firstHalf.begin(), firstHalf.end(), cmp);
    sort(secondHalf.begin(), secondHalf.end(), cmp);

    int size1 = firstHalf.size();
    int size2 = secondHalf.size();

    double tot = 0.0;

    if(size1 > 0){
        tot += getAngle(firstHalf[0], firstHalf[size1 -1]);
    }
    if(size2 > 0){
        tot += getAngle(secondHalf[0], secondHalf[size2 -1]);
    }

    if(size1 > 0 && size2 > 0){
        tot += min(getAngle(firstHalf[0], secondHalf[size2 -1]), getAngle(firstHalf[size1 - 1], secondHalf[0]));
    }

    printf("%lf", tot);

    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define pi 3.14159265

using namespace std;

int main()
{
    int n;
    cin>>n;
    vector <double> angl;
    int x, y;
    double cs;
    for (int i=0; i<n; i++)
        {
            cin>>x>>y;
            cs=(x*0+y*1)/sqrt(x*x+y*y);
            if (x<0)
                {
                    angl.push_back(360-acos(cs)*180/pi);
                }
               else
                {
                    angl.push_back(acos(cs)*180/pi);
                }
        }
    sort(angl.begin(), angl.end());
    double rez=angl[angl.size()-1]-angl[0];
    for (int i=1; i<angl.size(); i++)
        {
            rez=min(360-angl[i]+angl[i-1], rez);
        }
      cout<<std::fixed<<std::setprecision(12)<<rez;
    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define pi 3.14159265

using namespace std;

int main()
{
    int n;
    cin>>n;
    vector <double> angl;
    int x, y;
    double cs;
    for (int i=0; i<n; i++)
        {
            cin>>x>>y;
            cs=(x*0+y*1)/sqrt(x*x+y*y);
            if (x<0)
                {
                    angl.push_back(360-acos(cs)*180/pi);
                }
               else
                {
                    angl.push_back(acos(cs)*180/pi);
                }
        }
    sort(angl.begin(), angl.end());
    double rez=angl[angl.size()-1]-angl[0];
    for (int i=1; i<angl.size(); i++)
        {
            rez=min(360-angl[i]+angl[i-1], rez);
        }
      cout<<rez;
    return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;

void solve(istream &in, ostream &out)
{
  int n;
  in >> n;

  vector<double> rad(n);
  for (int i = 0; i < n; ++i) {
    double x, y;
    in >> x >> y;
    rad[i] = atan2(y, x);
  }
  sort(rad.begin(), rad.end());
  double maxd = 0.0;
  for (int i = 0; i < n; ++i) {
    double d = rad[(i+1)%n] - rad[i];
    if (d < 0)
      d += 2 * M_PI;
    maxd = max(maxd, d);
  }

  out << setprecision(10) << fixed << (2 * M_PI - maxd) * 180 / M_PI << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
const double M_PI = 3.141592653589793238462643383279;
#endif

void solve(istream &in, ostream &out)
{
  int n;
  in >> n;

  vector<double> rad(n);
  for (int i = 0; i < n; ++i) {
    double x, y;
    in >> x >> y;
    rad[i] = atan2(y, x);
  }
  sort(rad.begin(), rad.end());
  double maxd = 0.0;
  for (int i = 0; i < n; ++i) {
    double d = rad[(i+1)%n] - rad[i];
    if (d < 0)
      d += 2 * M_PI;
    maxd = max(maxd, d);
  }

  if (maxd == 0.0)
    out << setprecision(10) << fixed << 0.0 << endl;
  else
    out << setprecision(10) << fixed << (2 * M_PI - maxd) * 180 / M_PI << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;

#ifndef M_PI
const double M_PI = 3.141592653589793238462643383279;
#endif

void solve(istream &in, ostream &out)
{
  int n;
  in >> n;

  vector<double> rad(n);
  for (int i = 0; i < n; ++i) {
    double x, y;
    in >> x >> y;
    rad[i] = atan2(y, x);
  }
  sort(rad.begin(), rad.end());
  double maxd = 0.0;
  for (int i = 0; i < n; ++i) {
    double d = rad[(i+1)%n] - rad[i];
    if (d < 0)
      d += 2 * M_PI;
    maxd = max(maxd, d);
  }

  out << setprecision(10) << fixed << (2 * M_PI - maxd) * 180 / M_PI << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif

double calc(const vector<double> &a) {
  double m = a.back() - a.front();
  for (size_t i = 1; i < a.size(); ++i)
    m = min(m, 2 * M_PI - a[i] + a[i - 1]);
  return m * 180 / M_PI;
}

vector<double> parse(istream &in) {
  int n;
  in >> n;

  vector<double> a(n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    in >> x >> y;
    a[i] = atan2(y, x);
  }
  sort(a.begin(), a.end());
  return a;
}

void solve(istream &in, ostream &out)
{
  auto a = parse(in);
  out << setprecision(10) << fixed << calc(a) << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif

double degree(double rad) {
  return rad * 180 / M_PI;
}

double calc(const vector<double> &a) {
  double d = a.back() - a.front();
  for (auto iter = a.begin(); iter + 1 != a.end(); ++iter)
    d = min(d, 2 * M_PI - (*(iter + 1) - *iter));
  return degree(d);
}

vector<double> parse(istream &in) {
  int n;
  in >> n;
  vector<double> a(n);
  for (int i = 0; i < n; ++i) {
    double x, y;
    in >> x >> y;
    a[i] = atan2(y, x);
  }
  return a;
}

void solve(istream &in, ostream &out) {
  auto a = parse(in);
  out << calc(a) << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
const double M_PI = 3.141592653589793238462643383279;
#endif

void solve(istream &in, ostream &out)
{
  int n;
  in >> n;

  if (n == 1) {
    out << setprecision(10) << fixed << 0.0 << endl;
    return;
  }

  vector<double> rad(n);
  for (int i = 0; i < n; ++i) {
    double x, y;
    in >> x >> y;
    rad[i] = atan2(y, x);
  }
  sort(rad.begin(), rad.end());
  double maxd = 0.0;
  for (int i = 0; i < n; ++i) {
    double d = rad[(i+1)%n] - rad[i];
    if (d < 0)
      d += 2 * M_PI;
    maxd = max(maxd, d);
  }

  out << setprecision(10) << fixed << (2 * M_PI - maxd) * 180 / M_PI << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif

double calc(const vector<double> &a) {
  double m = 2 * M_PI;
  for (size_t i = 0; i < a.size(); ++i)
    m = min(m, fmod(a[(i - 1 + a.size()) % a.size()] - a[i] + 2 * M_PI, 2 * M_PI));
  return m * 180 / M_PI;
}

vector<double> parse(istream &in) {
  int n;
  in >> n;

  vector<double> a(n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    in >> x >> y;
    a[i] = atan2(y, x);
  }
  sort(a.begin(), a.end());
  return a;
}

void solve(istream &in, ostream &out)
{
  auto a = parse(in);
  out << setprecision(10) << fixed << calc(a) << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
const double M_PI = 3.141592653589793238462643383279;
#endif

double calc(const vector<double> &a) {
  return (a.back() - a.front()) * 180 / M_PI;
}

vector<double> parse(istream &in) {
  int n;
  in >> n;

  vector<double> a(n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    in >> x >> y;
    a[i] = atan2(y, x);
  }
  sort(a.begin(), a.end());
  return a;
}

void solve(istream &in, ostream &out)
{
  auto a = parse(in);
  out << setprecision(10) << fixed << calc(a) << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <map>
#include <iomanip>
using namespace std;
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif

double degree(double rad) {
  return rad * 180 / M_PI;
}

double calc(const vector<double> &a) {
  double d = a.back() - a.front();
  for (auto iter = a.begin(); iter + 1 != a.end(); ++iter)
    d = min(d, 2 * M_PI - (*(iter + 1) - *iter));
  return degree(d);
}

vector<double> parse(istream &in) {
  int n;
  in >> n;
  vector<double> a(n);
  for (int i = 0; i < n; ++i) {
    double x, y;
    in >> x >> y;
    a[i] = atan2(y, x);
  }
  sort(a.begin(), a.end());
  return a;
}

void solve(istream &in, ostream &out) {
  auto a = parse(in);
  out << setprecision(10) << fixed << calc(a) << endl;
}

int main() {
  solve(cin, cout);
  return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<functional>
#include<algorithm>
#include<set>
#include<queue>
#include<map>
#include<iomanip>
using namespace std;

typedef long long ll;

long long _e9 = 1e9;
int n,d;

const double pi = 3.14159265359;

int main()
{
    scanf("%d",&n);
    if(n==1) { cout << 0; }
    else
    {
        vector< double > A(n);
        for(int i=0;i<n;++i)
        {
            int x,y; double ang = 0;
            scanf("%d %d", &x, &y);
            if(x==0) ang = pi/2;
            else if(y==0) ang = 0;
            else ang = atan2(abs(y),abs(x));
            if(x<0) ang = pi-ang;
            if(y<0) ang = pi*2-ang;
            A[i] = ang;
        }
        sort(A.begin(),A.end());
        double ans = pi*2;
        if(n==2) ans = min(A[1]-A[0],pi*2-(A[1]-A[0]));
        else
        {
            for(int i=0;i<n-1;++i)
            {
                ans = min(ans,pi*2 -(A[i+1]-A[i]));
            }
            ans = min(ans,A[n-1]-A[0]);
        }
        printf("%9lf",ans*180/pi);
    }

    return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<functional>
#include<algorithm>
#include<set>
#include<queue>
#include<map>
#include<iomanip>
using namespace std;

typedef long long ll;

long long _e9 = 1e9;
ll n,d;

const double pi = 3.14159265359;

int main()
{
    cin >> n;
    if(n==1) { cout << 0; }
    else
    {
        vector< double > A(n);
        for(int i=0;i<n;++i)
        {
            double x,y,ang = 0;
            cin >> x >> y;
            if(x==0) ang = pi/2;
            else if(y==0) ang = 0;
            else ang = atan2(abs(y)/abs(x));
            if(x<0) ang = pi-ang;
            if(y<0) ang = pi*2-ang;
            A[i] = ang;
        }
        sort(A.begin(),A.end());
        double ans = pi*2;
        if(n==2) ans = min(A[1]-A[0],pi*2-(A[1]-A[0]));
        else
        {
            for(int i=0;i<n-1;++i)
            {
                ans = min(ans,pi*2 -(A[i+1]-A[i]));
            }
            ans = min(ans,A[n-1]-A[0]);
        }
        cout << fixed << setprecision(9) << ans*180/pi;
    }

    return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<functional>
#include<algorithm>
#include<set>
#include<queue>
#include<map>
#include<iomanip>
using namespace std;

typedef long long ll;

long long _e9 = 1e9;
ll n,d;

const double pi = 3.14159265359;

int main()
{
    cin >> n;
    if(n==1) { cout << 0; }
    else
    {
        vector< double > A(n);
        for(int i=0;i<n;++i)
        {
            double x,y,ang = 0;
            cin >> x >> y;
            if(x==0) ang = pi/2;
            else if(y==0) ang = 0;
            else ang = atan(abs(y)/abs(x));
            //cout << ang << ' ';
            if(x<0) ang = pi-ang;
            if(y<0) ang = pi*2-ang;
            A[i] = ang;
            //cout << ang << endl;
        }
        sort(A.begin(),A.end());
        double ans = pi*2;
        if(n==2) ans = min(A[1]-A[0],pi*2-(A[1]-A[0]));
        else
        {
            for(int i=0;i<n-1;++i)
            {
                ans = min(ans,pi*2 -(A[i+1]-A[i]));
            }
            ans = min(ans,A[n-1]-A[0]);
        }
        cout << fixed << setprecision(9) << ans*180/pi;
    }

    return 0;
}