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 pi = acos(-1.0);
const double eps = 1e-8;
const int MAXN = 100000;
int sgn(double x) { return x < -eps ? -1 : x > eps; }
struct point {
  double x, y;
  point() {}
  point(double a, double b) : x(a), y(b) {}
  void read() { scanf("%lf%lf", &x, &y); }
  void show() { printf("(%lf,%lf)\n", x, y); }
  point operator+(const point &b) const { return point(x + b.x, y + b.y); }
  point operator-(const point &b) const { return point(x - b.x, y - b.y); }
  point operator*(const double &b) const { return point(x * b, y * b); }
  point operator/(const double &b) const { return point(x / b, y / b); }
  bool operator==(const point &b) const {
    return (sgn(y - b.y) == 0 && sgn(x - b.x) == 0);
  }
  bool operator<(const point &b) const {
    if (sgn(y - b.y) == 0) return x < b.x;
    return y < b.y;
  }
  double operator*(const point &b) const { return x * b.x + y * b.y; }
  double X(const point &b) const { return x * b.y - y * b.x; }
  point rot(const double &ta) const {
    return point(cos(ta) * x - sin(ta) * y, sin(ta) * x + cos(ta) * y);
  }
  point rot90() const { return point(-y, x); }
  point unit() { return point(x, y) / len(); }
  double dis(const point &b) const {
    return sqrt(fabs(((x - b.x) * (x - b.x)) + ((y - b.y) * (y - b.y))));
  }
  double dis2(const point &b) const {
    return fabs(((x - b.x) * (x - b.x)) + ((y - b.y) * (y - b.y)));
  }
  double len() const { return sqrt(x * x + y * y); }
  double len2() const { return x * x + y * y; }
};
struct polygon {
  point p[MAXN];
  int n;
  void grahanm(polygon &ans) {
    sort(p, p + n);
    ans.p[0] = p[0];
    ans.p[1] = p[1];
    int now = 2;
    for (int i = 2; i < n; i++) {
      while (now > 1 &&
             sgn((ans.p[now - 1] - p[i]).X(ans.p[now - 2] - p[i])) >= 0)
        now--;
      ans.p[now++] = p[i];
    }
    int top = now;
    for (int i = n - 2; i >= 0; i--) {
      while (now > top &&
             sgn((ans.p[now - 1] - p[i]).X(ans.p[now - 2] - p[i])) >= 0)
        now--;
      ans.p[now++] = p[i];
    }
    ans.n = --now;
    n = ans.n;
    for (int i = 0; i < ans.n; i++) p[i] = ans.p[i];
  }
  double cal(int l, int r) {
    double ans = 0;
    if (l <= r)
      for (int i = l; i < r; i++) ans += p[i].X(p[i + 1]);
    else {
      for (int i = l; i < n; i++) ans += p[i].X(p[i + 1]);
      for (int i = 0; i < r; i++) ans += p[i].X(p[i + 1]);
    }
    ans += p[r].X(p[l]);
    return fabs(ans / 2);
  }
};
double solve(polygon &a) {
  double ans = 1e20;
  int l = 1, r = 1;
  a.p[a.n] = a.p[0];
  for (int i = 0; i < a.n; i++) {
    point vec = (a.p[i + 1] - a.p[i]).unit();
    while (sgn((a.p[(r + 1) % a.n] - a.p[i]) * vec -
               (a.p[r % a.n] - a.p[i]) * vec) >= 0)
      r++;
    while (l < r || sgn((a.p[(l + 1) % a.n] - a.p[i]) * vec -
                        (a.p[l % a.n] - a.p[i]) * vec) <= 0)
      l++;
    double s = -a.cal((i + 1) % a.n, r % a.n);
    double L = fabs((a.p[r % a.n] - a.p[i + 1]) * vec);
    s += fabs((a.p[r % a.n] - a.p[i + 1]).X(vec)) / 2 * L;
    ans = min(ans, s);
    s = -a.cal(l % a.n, i % a.n);
    L = fabs((a.p[l % a.n] - a.p[i]) * vec);
    s += fabs((a.p[l % a.n] - a.p[i]).X(vec)) / 2 * L;
    ans = min(ans, s);
  }
  return ans;
}
polygon p, tmp;
int main() {
  while (~scanf("%d", &p.n)) {
    for (int i = 0; i < p.n; i++) p.p[i].read();
    p.grahanm(tmp);
    printf("%.10f\n", solve(p));
  }
}