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 MAX_N_POINTS = 40000 + 10;
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator*(double d) const { return Point(x * d, y * d); }
  Point operator/(double d) const { return Point(x / d, y / d); }
  double det(const Point& p) const { return x * p.y - y * p.x; }
  double dot(const Point& p) const { return x * p.x + y * p.y; }
  Point rot90() const { return Point(y, -x); }
  void read() { scanf("%lf %lf", &x, &y); }
  void write() const { printf("%lf %lf", x, y); }
};
double EPS = 1e-10;
inline int sign(double x) { return x < EPS ? -1 : x > EPS; }
Point isSS(Point p1, Point p2, Point q1, Point q2) {
  double a1 = ((q2.x - q1.x) * (p1.y - q1.y) - (p1.x - q1.x) * (q2.y - q1.y)),
         a2 = -((q2.x - q1.x) * (p2.y - q1.y) - (p2.x - q1.x) * (q2.y - q1.y));
  return (p1 * a2 + p2 * a1) / (a1 + a2);
}
Point ps[MAX_N_POINTS * 2];
int nPs;
int main() {
  scanf("%d", &nPs);
  for (int i = 0; i < nPs; ++i) {
    ps[i].read();
  }
  if ((sign(((ps[1].x - ps[0].x) * (ps[2].y - ps[0].y) -
             (ps[2].x - ps[0].x) * (ps[1].y - ps[0].y)))) < 0) {
    reverse(ps, ps + nPs);
  }
  copy(ps, ps + nPs, ps + nPs);
  double ans = 1e100;
  for (int step = 0; step < 2; ++step) {
    double area = 0;
    int next = 1;
    for (int i = 0; i < nPs; ++i) {
      if (i > 0)
        area -= ((ps[i].x - ps[i - 1].x) * (ps[next].y - ps[i - 1].y) -
                 (ps[next].x - ps[i - 1].x) * (ps[i].y - ps[i - 1].y));
      Point dir = ps[i + 1] - ps[i];
      for (; ps[next + 1].dot(dir) > ps[next].dot(dir); ++next)
        area += ((ps[next].x - ps[i].x) * (ps[next + 1].y - ps[i].y) -
                 (ps[next + 1].x - ps[i].x) * (ps[next].y - ps[i].y));
      Point is = isSS(ps[i], ps[i + 1], ps[next], ps[next] + dir.rot90());
      double triArea = fabs(((is.x - ps[i].x) * (ps[next].y - ps[i].y) -
                             (ps[next].x - ps[i].x) * (is.y - ps[i].y)) /
                            2);
      double ret = triArea - area / 2;
      ans = min(ans, ret);
    }
    for (int i = 0; i < nPs + nPs; ++i) {
      ps[i].x *= -1;
    }
    reverse(ps, ps + nPs + nPs);
  }
  printf("%0.10lf\n", ans);
}