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;
typedef struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  void read() { scanf("%lf%lf", &x, &y); }
} Point;
Point P[200001];
double A[200001];
int n;
double cross(point p1, point p2, point p3) {
  return (p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x);
}
double dot(point p1, point p2, point p3) {
  return (p2.x - p1.x) * (p3.x - p1.x) + (p2.y - p1.y) * (p3.y - p1.y);
}
double area(point p1, point p2, point p3) {
  return abs(p1.x * p2.y + p2.x * p3.y + p3.x * p1.y - p1.y * p2.x -
             p2.y * p3.x - p3.y * p1.x) *
         0.5;
}
double dist(point p1, point p2) {
  return sqrt((p2.x - p1.x) * (p2.x - p1.x) + (p2.y - p1.y) * (p2.y - p1.y));
}
double findArea(point p1, point p2, point p3) {
  double t = dot(p2, p1, p3), d = dist(p1, p2), c = cross(p2, p1, p3);
  return 0.5 * abs(t / d * c / d);
}
double qArea(int a, int b) {
  if (a % (n + 1) > b % (n + 1))
    return area(P[1], P[a], P[b]) + A[b - 1] - A[a - 1];
  else
    return A[b - 1] - A[a - 1] - area(P[1], P[a], P[b]);
}
int main() {
  double ans = 1e17;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    P[i].read();
    P[n + i] = P[i];
  }
  for (int rt = 0; rt < 2; rt++) {
    for (int i = 1; i < 2 * n - 1; i++)
      A[i] = area(P[1], P[i], P[i + 1]) + A[i - 1];
    int id = 2;
    for (int i = 1; i <= n; i++) {
      if (id <= i) id = i + 1;
      double t = dot(P[i + 1], P[i], P[id]);
      while (dot(P[i + 1], P[i], P[id + 1]) - t < 1e-12)
        t = dot(P[i + 1], P[i], P[++id]);
      if (id == i + 1)
        ans = 0.00;
      else
        ans = min(ans, findArea(P[i], P[i + 1], P[id]) - qArea(i + 1, id));
    }
    reverse(P + 1, P + n + n + 1);
  }
  printf("%.10lf\n", ans);
  return 0;
}