Problem: Flatland has recently introduced a new type of an eye check for the driver's licence. The check goes like that: there is a plane with mannequins standing on it. You should tell the value of the minimum angle with the vertex at the origin of coordinates and with all mannequins standing inside or on the boarder of this angle. 

As you spend lots of time "glued to the screen", your vision is impaired. So you have to write a program that will pass the check for you.

Input

The first line contains a single integer n (1 ≤ n ≤ 105) — the number of mannequins.

Next n lines contain two space-separated integers each: xi, yi (|xi|, |yi| ≤ 1000) — the coordinates of the i-th mannequin. It is guaranteed that the origin of the coordinates has no mannequin. It is guaranteed that no two mannequins are located in the same point on the plane.

Output

Print a single real number — the value of the sought angle in degrees. The answer will be considered valid if the relative or absolute error doesn't exceed 10 - 6. 

Examples

Input

2
2 0
0 2


Output

90.0000000000


Input

3
2 0
0 2
-2 2


Output

135.0000000000


Input

4
2 0
0 2
-2 0
0 -2


Output

270.0000000000


Input

2
2 1
1 2


Output

36.8698976458

Note

Solution for the first sample test is shown below: 

<image>

Solution for the second sample test is shown below: 

<image>

Solution for the third sample test is shown below: 

<image>

Solution for the fourth sample test is shown below: 

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
const double eps = 1e-9;
struct point {
  double x, y;
};
bool comp(double x, double y) {
  if (x + eps < y)
    return true;
  else
    return false;
}
int main(void) {
  vector<point> points[4];
  vector<double> angles[4];
  vector<double> angle;
  const double pi = 3.141592653589;
  int n, i, j;
  cin >> n;
  point tmp;
  for (i = 0; i < n; i++) {
    cin >> tmp.x >> tmp.y;
    if (tmp.x >= 0 && tmp.y > 0) points[0].push_back(tmp);
    if (tmp.x > 0 && tmp.y <= 0) points[1].push_back(tmp);
    if (tmp.x <= 0 && tmp.y < 0) points[2].push_back(tmp);
    if (tmp.x < 0 && tmp.y >= 0) points[3].push_back(tmp);
  }
  for (j = 0; j < 4; j++) angles[j].resize(points[j].size());
  for (i = 0; i < (int)points[0].size(); i++) {
    double cos;
    double x1, y1, x2, y2;
    x1 = 0;
    y1 = 1;
    x2 = points[0][i].x;
    y2 = points[0][i].y;
    cos = (x1 * x2 + y1 * y2) * (x1 * x2 + y1 * y2) /
          ((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2));
    cos = sqrt(cos);
    angles[0][i] = acos(cos);
  }
  for (i = 0; i < (int)points[1].size(); i++) {
    double cos;
    double x1, y1, x2, y2;
    x1 = 1;
    y1 = 0;
    x2 = points[1][i].x;
    y2 = points[1][i].y;
    cos = (x1 * x2 + y1 * y2) * (x1 * x2 + y1 * y2) /
          ((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2));
    cos = sqrt(cos);
    angles[1][i] = acos(cos);
  }
  for (i = 0; i < (int)points[2].size(); i++) {
    double cos;
    double x1, y1, x2, y2;
    x1 = 0;
    y1 = -1;
    x2 = points[2][i].x;
    y2 = points[2][i].y;
    cos = (x1 * x2 + y1 * y2) * (x1 * x2 + y1 * y2) /
          ((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2));
    cos = sqrt(cos);
    angles[2][i] = acos(cos);
  }
  for (i = 0; i < (int)points[3].size(); i++) {
    double cos;
    double x1, y1, x2, y2;
    x1 = -1;
    y1 = 0;
    x2 = points[3][i].x;
    y2 = points[3][i].y;
    cos = (x1 * x2 + y1 * y2) * (x1 * x2 + y1 * y2) /
          ((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2));
    cos = sqrt(cos);
    angles[3][i] = acos(cos);
  }
  for (i = 0; i < (int)angles[0].size(); i++) {
    angle.push_back(angles[0][i] * 180 / pi);
  }
  for (i = 0; i < (int)angles[1].size(); i++) {
    angle.push_back(angles[1][i] * 180 / pi + 90);
  }
  for (i = 0; i < (int)angles[2].size(); i++) {
    angle.push_back(angles[2][i] * 180 / pi + 180);
  }
  for (i = 0; i < (int)angles[3].size(); i++) {
    angle.push_back(angles[3][i] * 180 / pi + 270);
  }
  sort(angle.begin(), angle.end(), comp);
  double ans = 360;
  if (n == 1) {
    printf("0");
    return 0;
  }
  if (n == 2) {
    ans = (angle[1] - angle[0] > 180 + eps ? 360 - (angle[1] - angle[0])
                                           : angle[1] - angle[0]);
    printf("%.10f", ans);
    return 0;
  }
  for (i = 0; i < n - 1; i++) {
    if (360 - (angle[i + 1] - angle[i]) + eps < ans)
      ans = 360 - (angle[i + 1] - angle[i]);
  }
  if (360 - (360 + angle[0] - angle[n - 1]) + eps < ans)
    ans = 360 - (360 + angle[0] - angle[n - 1]);
  printf("%.10f", ans);
  return 0;
}