Problem: One winter evening the Hedgehog was relaxing at home in his cozy armchair and clicking through the TV channels. Stumbled on an issue of «TopShop», the Hedgehog was about to change the channel when all of a sudden he was stopped by an advertisement of a new wondrous invention.

Actually, a vacuum cleaner was advertised there. It was called Marvellous Vacuum and it doesn't even need a human to operate it while it cleans! The vacuum cleaner can move around the flat on its own: it moves in some direction and if it hits an obstacle there, it automatically chooses a new direction. Sooner or later this vacuum cleaner will travel through all the room and clean it all. Having remembered how much time the Hedgehog spends every time on cleaning (surely, no less than a half of the day), he got eager to buy this wonder.

However, the Hedgehog quickly understood that the cleaner has at least one weak point: it won't clean well in the room's corners because it often won't able to reach the corner due to its shape. To estimate how serious is this drawback in practice, the Hedgehog asked you to write for him the corresponding program.

You will be given the cleaner's shape in the top view. We will consider only the cases when the vacuum cleaner is represented as a convex polygon. The room is some infinitely large rectangle. We consider one corner of this room and want to find such a rotation of the vacuum cleaner so that it, being pushed into this corner, will leave the minimum possible area in the corner uncovered.

Input

The first line contains an integer N which represents the number of vertices of the vacuum cleaner's polygon (3 ≤ N ≤ 4·104). Then follow N lines each containing two numbers — the coordinates of a vertex of the polygon. All the coordinates are integer and their absolute values do not exceed 106.

It is guaranteed that the given polygon is nondegenerate and convex (no three points lie on the same line). The polygon vertices are given in a clockwise or counter-clockwise direction.

Output

Print the minimum possible uncovered area. The answer will be accepted if it is within 10 - 6 of absolute or relative error from the correct answer.

Examples

Input

4
0 0
1 0
1 1
0 1


Output

0.00000000000000000000

Input

8
1 2
2 1
2 -1
1 -2
-1 -2
-2 -1
-2 1
-1 2


Output

0.50000000000000000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int DIM = 200005;
const double EPS = 0.0000001;
const double MPI = 3.141592653589793238462643383279;
struct point {
  double x, y;
  point() : x(0.0), y(0.0){};
  point(double _x, double _y) : x(_x), y(_y){};
};
struct line {
  double x1, y1, x2, y2;
  line() : x1(0.0), y1(0.0), x2(0.0), y2(0.0){};
  line(double _x1, double _y1, double _x2, double _y2)
      : x1(_x1), y1(_y1), x2(_x2), y2(_y2){};
  line(point p1, point p2) : x1(p1.x), y1(p1.y), x2(p2.x), y2(p2.y){};
};
int sign(double x) {
  if (fabs(x) < EPS) return 0;
  return x < 0.0 ? -1 : 1;
}
double degToRad(double x) { return x * MPI / 180.0; }
double radToDeg(double x) { return x / MPI * 180.0; }
double ccw(point p1, point p2, point p3) {
  return (p2.x - p1.x) * (p3.y - p1.y) - (p3.x - p1.x) * (p2.y - p1.y);
}
double triArea(point p1, point p2, point p3) {
  return fabs(ccw(p1, p2, p3)) / 2.0;
}
double sqrDist(point p1, point p2) {
  return (p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y);
}
double getAng(point a, point b, point c) {
  double v1 = sqrDist(a, b) + sqrDist(a, c) - sqrDist(b, c),
         v2 = 2.0 * sqrt(sqrDist(a, b)) * sqrt(sqrDist(a, c));
  double ang =
      radToDeg(acos((sqrDist(a, b) + sqrDist(a, c) - sqrDist(b, c)) /
                    (2.0 * sqrt(sqrDist(a, b)) * sqrt(sqrDist(a, c)))));
  return radToDeg(acos((sqrDist(a, b) + sqrDist(a, c) - sqrDist(b, c)) /
                       (2.0 * sqrt(sqrDist(a, b)) * sqrt(sqrDist(a, c)))));
}
point lineInt(line l1, line l2) {
  double x1 = l1.x1, y1 = l1.y1, x2 = l1.x2, y2 = l1.y2, x3 = l2.x1, y3 = l2.y1,
         x4 = l2.x2, y4 = l2.y2;
  return point(
      ((x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4)) /
          ((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4)),
      ((x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4)) /
          ((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4)));
}
point pts[DIM];
double psm[DIM];
int main(void) {
  int n;
  cin >> n;
  point avg;
  for (int i = 1; i <= n; ++i) {
    cin >> pts[i].x >> pts[i].y;
    avg.x += pts[i].x;
    avg.y += pts[i].y;
  }
  avg.x /= n;
  avg.y /= n;
  for (int i = n + 1; i <= n * 3; ++i) pts[i] = pts[i - n];
  if (ccw(pts[1], pts[2], pts[3]) < 0) reverse(pts + 1, pts + n * 3 + 1);
  for (int i = 2; i <= n * 3; ++i)
    psm[i] = psm[i - 1] + triArea(pts[i - 1], pts[i], avg);
  double ans = numeric_limits<double>::max();
  for (int i = 1, j = i + 1; i <= n; ++i) {
    while (j <= i or
           getAng(lineInt(line(pts[i], pts[i + 1]), line(pts[j], pts[j + 1])),
                  pts[i], pts[j + 1]) >= 90.0)
      ++j;
    if (i + 1 == j)
      ans = 0.0;
    else {
      double ip, c1, c2;
      ip = hypot(fabs(pts[i].x - pts[j].x), fabs(pts[i].y - pts[j].y));
      c1 = cos(degToRad(getAng(pts[i], pts[i + 1], pts[j]))) * ip;
      c2 = sqrt(ip * ip - c1 * c1);
      ans = min(ans, c1 * c2 / 2.0 - (psm[j] - psm[i]) +
                         triArea(pts[i], pts[j], avg) *
                             sign(ccw(pts[i], pts[j], avg)));
    }
  }
  for (int i = 3 * n, j = i - 1; i >= 2 * n; --i) {
    while (j >= i or
           getAng(lineInt(line(pts[i], pts[i - 1]), line(pts[j], pts[j - 1])),
                  pts[i], pts[j - 1]) >= 90.0)
      --j;
    if (i - 1 == j)
      ans = 0.0;
    else {
      double ip, c1, c2;
      ip = hypot(fabs(pts[i].x - pts[j].x), fabs(pts[i].y - pts[j].y));
      c1 = cos(degToRad(getAng(pts[i], pts[i - 1], pts[j]))) * ip;
      c2 = sqrt(ip * ip - c1 * c1);
      ans = min(ans, c1 * c2 / 2.0 - (psm[i] - psm[j]) +
                         triArea(pts[j], pts[i], avg) *
                             sign(ccw(pts[j], pts[i], avg)));
    }
  }
  cout << setprecision(10) << fixed << ans << endl;
  return 0;
}