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 MAXN = 80005;
const double INF = 1e18, Pi = acos(-1);
int n, f;
double x[MAXN], y[MAXN], s[MAXN], ans = INF, w[MAXN];
double Query(int l, int r) {
  return fabs(x[l] * y[r] - x[r] * y[l] - s[r] + s[l]) / 2;
}
bool equ(double a, double b) { return fabs(a - b) < 1e-7; }
double Angle(double x, double y) {
  if (equ(x, 0))
    if (y > 0)
      return Pi / 2;
    else
      return 3 * Pi / 2;
  if (x > 0) return atan(y / x);
  if (x < 0) return atan(y / x) + Pi;
}
inline int G(double x) {
  if (x > 0) return 1;
  if (x < 0) return -1;
  return 0;
}
inline double L(int i, int j) {
  return (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]);
}
inline double dot(double x1, double y1, double x2, double y2) {
  return x1 * x2 + y1 * y2;
}
void work() {
  int f;
  double t, a, b;
  for (int i = 1; i <= 2 * n; i++) {
    w[i] = Angle(x[i] - x[i - 1], y[i] - y[i - 1]);
    if (w[i] < 0) w[i] += 2 * Pi;
  }
  if (fabs(w[1] - w[2]) < Pi)
    f = G(w[2] - w[1]);
  else
    f = G(w[1] - w[2]);
  if (f == -1) {
    for (int i = 1; i <= n; i++)
      x[i + n] = x[n - i + 1], y[i + n] = y[n - i + 1];
    for (int i = 1; i <= n; i++) x[i] = x[i + n], y[i] = y[i + n];
    x[0] = x[n], y[0] = y[n];
    for (int i = 1; i <= 2 * n; i++) {
      w[i] = Angle(x[i] - x[i - 1], y[i] - y[i - 1]);
      if (w[i] < 0) w[i] += 2 * Pi;
    }
  }
  f = 0;
  t = w[1];
  for (int i = 2; i <= 2 * n; i++) {
    if (w[i] < t) f++;
    t = w[i];
    w[i] += 2 * Pi * f;
  }
  for (int i = 1; i <= 2 * n; i++)
    s[i] = x[i - 1] * y[i] - x[i] * y[i - 1] + s[i - 1];
  int j = 1;
  for (int i = 1; i <= n; i++) {
    while ((w[j + 1] - w[i]) < (Pi / 2)) j++;
    a = fabs(dot(x[i] - x[i - 1], y[i] - y[i - 1], x[j] - x[i], y[j] - y[i])) /
        sqrt(L(i - 1, i));
    b = sqrt(L(i, j) - a * a);
    ans = min(ans, a * b / 2 - Query(i, j));
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%lf%lf", &x[i], &y[i]), x[i + n] = x[i], y[i + n] = y[i];
  x[0] = x[n], y[0] = y[n];
  work();
  for (int i = 0; i <= 2 * n + 1; i++) x[i] = -x[i];
  work();
  printf("%.9lf\n", ans);
  return 0;
}