#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
double sqr(double a) { return a * a; }
bool zero(double a) { return fabs(a) < eps; }
int sgn(double x) { return x < -eps ? -1 : x > eps; }
struct pt {
  double x, y;
  pt(double _x = 0, double _y = 0) : x(_x), y(_y) {}
  pt operator-(const pt& r) const { return pt(x - r.x, y - r.y); }
  pt operator+(const pt& r) const { return pt(x + r.x, y + r.y); }
  pt operator*(const double& r) const { return pt(x * r, y * r); }
  double operator*(const pt& r) const { return x * r.x + y * r.y; }
  double operator^(const pt& r) const { return x * r.y - y * r.x; }
  bool operator<(const pt& r) const {
    return zero(x - r.x) ? y < r.y : x < r.x;
  }
  int input() { return scanf("%lf %lf", &x, &y); }
  double len() { return sqrt(x * x + y * y); }
  double dist(const pt& r) const { return ((*this) - r).len(); }
  pt rotate(double ag) {
    return pt(x * cos(ag) - y * sin(ag), x * sin(ag) + y * cos(ag));
  }
  double ang() { return atan2(y, x); }
  pt scale(double leg) { return (*this) * (leg / len()); }
  void output() { printf("%lf %lf\n", x, y); }
};
double xmult(pt p1, pt p2, pt p0) { return (p1 - p0) ^ (p2 - p0); }
double areaPolygon(int n, pt* p) {
  double area = 0.0;
  for (int i = 0; i < n; ++i) {
    area += p[i] ^ p[(i + 1) % n];
  }
  return area;
}
const int maxn = 50050 * 3;
pt p[maxn];
double sum[maxn], result;
int n;
void solved() {
  for (int i = 0; i < n; ++i) {
    p[i + n] = p[i];
  }
  sum[0] = 0.0;
  for (int i = 1; i <= 2 * n; ++i) {
    sum[i] = sum[i - 1] + (p[i] ^ p[i - 1]) * 0.5;
  }
  for (int i = 0, j = 0; i < n; ++i) {
    j = max(i + 1, j);
    while (j + 1 < 2 * n && sgn((p[j + 1] - p[i]) * (p[i + 1] - p[i]) -
                                (p[j] - p[i]) * (p[i + 1] - p[i])) >= 0)
      ++j;
    if (j == i + 1) result = 0.0;
    if (j >= 2 * n) break;
    double X = (p[j] - p[i]) * (p[i + 1] - p[i]) / (p[i + 1] - p[i]).len();
    double Y = sqrt(sqr((p[j] - p[i]).len()) - sqr(X));
    double area = sum[j] - sum[i];
    area += (p[i] ^ p[j]) * 0.5;
    result = min(result, X * Y / 2.0 - fabs(area));
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    p[i].input();
  }
  result = 1e100;
  solved();
  reverse(p, p + n);
  solved();
  printf("%.12lf\n", result);
  return 0;
}

### Prompt

In CPP, your task is to solve the following 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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
double sqr(double a) { return a * a; }
bool zero(double a) { return fabs(a) < eps; }
int sgn(double x) { return x < -eps ? -1 : x > eps; }
struct pt {
  double x, y;
  pt(double _x = 0, double _y = 0) : x(_x), y(_y) {}
  pt operator-(const pt& r) const { return pt(x - r.x, y - r.y); }
  pt operator+(const pt& r) const { return pt(x + r.x, y + r.y); }
  pt operator*(const double& r) const { return pt(x * r, y * r); }
  double operator*(const pt& r) const { return x * r.x + y * r.y; }
  double operator^(const pt& r) const { return x * r.y - y * r.x; }
  bool operator<(const pt& r) const {
    return zero(x - r.x) ? y < r.y : x < r.x;
  }
  int input() { return scanf("%lf %lf", &x, &y); }
  double len() { return sqrt(x * x + y * y); }
  double dist(const pt& r) const { return ((*this) - r).len(); }
  pt rotate(double ag) {
    return pt(x * cos(ag) - y * sin(ag), x * sin(ag) + y * cos(ag));
  }
  double ang() { return atan2(y, x); }
  pt scale(double leg) { return (*this) * (leg / len()); }
  void output() { printf("%lf %lf\n", x, y); }
};
double xmult(pt p1, pt p2, pt p0) { return (p1 - p0) ^ (p2 - p0); }
double areaPolygon(int n, pt* p) {
  double area = 0.0;
  for (int i = 0; i < n; ++i) {
    area += p[i] ^ p[(i + 1) % n];
  }
  return area;
}
const int maxn = 50050 * 3;
pt p[maxn];
double sum[maxn], result;
int n;
void solved() {
  for (int i = 0; i < n; ++i) {
    p[i + n] = p[i];
  }
  sum[0] = 0.0;
  for (int i = 1; i <= 2 * n; ++i) {
    sum[i] = sum[i - 1] + (p[i] ^ p[i - 1]) * 0.5;
  }
  for (int i = 0, j = 0; i < n; ++i) {
    j = max(i + 1, j);
    while (j + 1 < 2 * n && sgn((p[j + 1] - p[i]) * (p[i + 1] - p[i]) -
                                (p[j] - p[i]) * (p[i + 1] - p[i])) >= 0)
      ++j;
    if (j == i + 1) result = 0.0;
    if (j >= 2 * n) break;
    double X = (p[j] - p[i]) * (p[i + 1] - p[i]) / (p[i + 1] - p[i]).len();
    double Y = sqrt(sqr((p[j] - p[i]).len()) - sqr(X));
    double area = sum[j] - sum[i];
    area += (p[i] ^ p[j]) * 0.5;
    result = min(result, X * Y / 2.0 - fabs(area));
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    p[i].input();
  }
  result = 1e100;
  solved();
  reverse(p, p + n);
  solved();
  printf("%.12lf\n", result);
  return 0;
}

```