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 double eps = 1e-8;
const double pi = acos(-1.0);
inline int sgn(double x) { return (x > eps) - (x < -eps); }
inline double sqr(double x) { return x * x; }
struct point {
  double x, y;
  point(double _x = 0, double _y = 0) { x = _x, y = _y; }
  point operator-(const point &a) { return point(x - a.x, y - a.y); }
  void input() { scanf("%lf%lf", &x, &y); }
  void output() { printf("%f %f\n", x, y); }
} p[150000];
inline double mult(point a, point b, point c) {
  return (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x);
}
inline double dist(point a, point b) {
  return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y));
}
inline double dot(point a, point b) { return a.x * b.x + a.y * b.y; }
inline double cross(point a, point b) { return a.x * b.y - a.y * b.x; }
inline double _angle(point a, point b) {
  double res =
      acos(dot(a, b) /
           ((sqrt(a.x * a.x + a.y * a.y) * sqrt(b.x * b.x + b.y * b.y))));
  if (sgn(cross(a, b)) < 0) return 2 * pi - res;
  return res;
}
inline point intersection(point u1, point u2, point v1, point v2) {
  point ret = u1;
  double t = ((u1.x - v1.x) * (v1.y - v2.y) - (u1.y - v1.y) * (v1.x - v2.x)) /
             ((u1.x - u2.x) * (v1.y - v2.y) - (u1.y - u2.y) * (v1.x - v2.x));
  ret.x += (u2.x - u1.x) * t;
  ret.y += (u2.y - u1.y) * t;
  return ret;
}
inline point p_to_l(point p, point l1, point l2) {
  point t = p;
  t.x += l1.y - l2.y, t.y += l2.x - l1.x;
  return intersection(p, t, l1, l2);
}
inline void solve(point p[], int n, double &ans) {
  int j = 0;
  double sum = 0;
  for (int i = 0; i < n; i++) {
    j = max(j, i + 1);
    double angle = _angle(p[i + 1] - p[i], p[j + 1] - p[j]);
    while (sgn(angle - pi / 2) < 0 && j < i + n) {
      j++;
      sum += mult(p[j], p[j - 1], p[i]);
      angle = _angle(p[i + 1] - p[i], p[j + 1] - p[j]);
    }
    sum -= mult(p[j], p[i + 1], p[i]);
    point tmp = p_to_l(p[j], p[i + 1], p[i + n]);
    double res = dist(tmp, p[j]) * dist(tmp, p[i + 1]) / 2;
    ans = min(ans, res - fabs(sum) / 2);
  }
}
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; i++) p[i].input(), p[i + n] = p[i];
    double ans = 1e20;
    if (sgn(mult(p[2], p[1], p[0])) > 0) reverse(p, p + 2 * n);
    solve(p, n, ans);
    reverse(p, p + 2 * n);
    for (int i = 0; i < 2 * n; i++) p[i].x = -p[i].x;
    solve(p, n, ans);
    printf("%.20f\n", ans);
  }
}