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;
struct TPoint {
  long long x, y;
  TPoint(long long _x = 0, long long _y = 0) : x(_x), y(_y) {}
};
long long dist2(const TPoint &a, const TPoint &b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
int main() {
  cout.precision(10);
  cout << fixed;
  int N;
  cin >> N;
  vector<TPoint> points(N);
  for (int i = 0; i < N; ++i) {
    cin >> points[i].x >> points[i].y;
  }
  vector<long double> traps(N);
  traps[0] = 0.0;
  for (int i = 1; i < N; ++i) {
    traps[i] = traps[i - 1] + 0.5 * (points[i].x - points[i - 1].x) *
                                  (points[i].y + points[i - 1].y);
  }
  long double S = traps[N - 1] + 0.5 * (points[0].x - points[N - 1].x) *
                                     (points[0].y + points[N - 1].y);
  if (S < 0) {
    S = -S;
    for (int i = 0; i < N; ++i) {
      traps[i] = -traps[i];
      points[i].x = -points[i].x;
    }
  }
  int curMin = 0, curMax = 0;
  long long A = points[1].x - points[0].x, B = points[1].y - points[0].y;
  for (int i = 1; i < N; ++i) {
    long long Q = A * points[i].x + B * points[i].y;
    if (Q < A * points[curMin].x + B * points[curMin].y) {
      curMin = i;
    }
    if (Q > A * points[curMax].x + B * points[curMax].y) {
      curMax = i;
    }
  }
  long double ans = 1e15;
  for (int i = 0; i < N; ++i) {
    int ii = (i + 1) % N;
    A = points[ii].x - points[i].x;
    B = points[ii].y - points[i].y;
    while (A * points[(curMin + 1) % N].x + B * points[(curMin + 1) % N].y <=
           A * points[curMin].x + B * points[curMin].y) {
      curMin = (curMin + 1) % N;
    }
    while (A * points[(curMax + 1) % N].x + B * points[(curMax + 1) % N].y >=
           A * points[curMax].x + B * points[curMax].y) {
      curMax = (curMax + 1) % N;
    }
    long long d = A * points[curMax].x + B * points[curMax].y -
                  A * points[ii].x - B * points[ii].y;
    long long D = dist2(points[ii], points[curMax]);
    long double exc = traps[curMax] - traps[ii] -
                      0.5 * (points[curMax].x - points[ii].x) *
                          (points[curMax].y + points[ii].y);
    while (exc < 0) {
      exc += S;
    }
    ans = min(ans, 0.5 * d * sqrt(1.0 * D * (A * A + B * B) - 1.0 * d * d) /
                           (A * A + B * B) -
                       exc);
    d = -(A * points[curMin].x + B * points[curMin].y - A * points[i].x -
          B * points[i].y);
    D = dist2(points[i], points[curMin]);
    exc = traps[i] - traps[curMin] -
          0.5 * (points[i].x - points[curMin].x) *
              (points[i].y + points[curMin].y);
    while (exc < 0) {
      exc += S;
    }
    ans = min(ans, 0.5 * d * sqrt(1.0 * D * (A * A + B * B) - 1.0 * d * d) /
                           (A * A + B * B) -
                       exc);
  }
  cout << ans << '\n';
  return 0;
}