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;
int n;
long double x[80010], y[80010];
const long double PI = atan2(0, -1);
long double sum[80010];
bool cw(int a, int b, int c) {
  return (x[b] - x[a]) * (y[c] - y[a]) - (x[c] - x[a]) * (y[b] - y[a]) < 0;
}
long double getS(long double x, long double y, long double xx, long double yy) {
  return x * yy - xx * y;
}
int main() {
  long double ans = 1e100;
  scanf("%d", &n);
  double tmpx, tmpy;
  for (int i = 0; i < (int)(n); ++i)
    scanf("%lf%lf", &tmpx, &tmpy), x[i] = tmpx, y[i] = tmpy;
  long double cx = 0, cy = 0;
  for (int i = 0; i < (int)(n); ++i) cx += x[i], cy += y[i];
  cx /= n;
  cy /= n;
  for (int i = 0; i < (int)(n); ++i) x[i] -= cx, y[i] -= cy;
  for (int zzz = 0; zzz < (int)(2); ++zzz) {
    if (cw(0, 1, 2)) {
      reverse(x, x + n);
      reverse(y, y + n);
    }
    for (int i = 0; i < (int)(n + 10); ++i) x[n + i] = x[i], y[n + i] = y[i];
    sum[0] = 0;
    for (int i = 1; i < 2 * n + 10; ++i) {
      sum[i] = sum[i - 1] + getS(x[i - 1], y[i - 1], x[i], y[i]);
    }
    int j = 0;
    for (int i = 0; i < (int)(n); ++i) {
      long double ang = atan2(y[i + 1] - y[i], x[i + 1] - x[i]);
      if (j <= i) ++j;
      while (true) {
        long double delta = atan2(y[j + 1] - y[j], x[j + 1] - x[j]) - ang;
        while (delta < 0) delta += 2 * PI;
        while (delta >= 2 * PI) delta -= 2 * PI;
        if (delta >= 0.5 * PI) break;
        ++j;
      }
      bool flag = j < n;
      if (flag) j += n;
      ang = -ang;
      long double si = sin(ang);
      long double co = cos(ang);
      int best = -1;
      long double bestxx = 0, bestyy = 0;
      for (int k = j - 3; k <= j + 3; ++k) {
        long double xx = co * x[k] - si * y[k];
        long double yy = si * x[k] + co * y[k];
        if (best == -1 || xx > bestxx) {
          best = k;
          bestxx = xx;
          bestyy = yy;
        }
      }
      while (best < i) best += n;
      while (best - n > i) best -= n;
      long double s = sum[best] - sum[i];
      long double vx = co * x[i] - si * y[i];
      long double vy = si * x[i] + co * y[i];
      long double cur =
          getS(vx, vy, bestxx, vy) + getS(bestxx, vy, bestxx, bestyy) - s;
      cur = abs(cur * 0.5);
      ans = min(ans, cur);
      if (flag) j -= n;
    }
    for (int i = 0; i < (int)(n); ++i) swap(x[i], y[i]);
  }
  printf("%.12f\n", (double)ans);
  return 0;
}