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>
#pragma comment(linker, "/stack:64000000")
using namespace std;
template <typename first>
inline first abs(const first& a) {
  return a < 0 ? -a : a;
}
template <typename first>
inline first sqr(const first& a) {
  return a * a;
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-9;
const int INF = 1000 * 1000 * 1000;
const int N = 4 * 10 * 1000 + 13;
inline bool operator<(const pair<long double, long double>& a,
                      const pair<long double, long double>& b) {
  if (abs(a.first - b.first) > EPS) return a.first < b.first;
  return a.second + EPS < b.second;
}
inline pair<long double, long double> operator-(
    const pair<long double, long double>& a,
    const pair<long double, long double>& b) {
  return make_pair((a.first - b.first), (a.second - b.second));
}
inline pair<long double, long double> operator+(
    const pair<long double, long double>& a,
    const pair<long double, long double>& b) {
  return make_pair((a.first + b.first), (a.second + b.second));
}
inline pair<long double, long double> operator/(
    const pair<long double, long double>& a, const long double& c) {
  return make_pair((a.first / c), (a.second / c));
}
inline long double cross(const pair<long double, long double>& a,
                         const pair<long double, long double>& b) {
  return a.first * b.second - a.second * b.first;
}
inline long double dot(const pair<long double, long double>& a,
                       const pair<long double, long double>& b) {
  return a.first * b.first + a.second * b.second;
}
inline bool turnRight(const pair<long double, long double>& a,
                      const pair<long double, long double>& b,
                      const pair<long double, long double>& c) {
  pair<long double, long double> v1 = b - a, v2 = c - a;
  return cross(v1, v2) < -EPS;
}
inline long double len(const pair<long double, long double>& a) {
  return sqrt(sqr(a.first) + sqr(a.second));
}
inline pair<long double, long double> norm(
    const pair<long double, long double>& v) {
  long double l = len(v);
  assert(abs(l) > EPS);
  return make_pair((v.first / l), (v.second / l));
}
inline pair<long double, long double> inBasis(
    const pair<long double, long double>& e1,
    const pair<long double, long double>& e2,
    const pair<long double, long double>& p) {
  return make_pair((dot(p, e1)), (dot(p, e2)));
}
int n;
pair<long double, long double> p[N];
long double s[N];
pair<long double, long double> cen;
inline long double getS(int i, int j) {
  if (i == j) return 0.0;
  assert(j > 0);
  return s[j - 1] - ((i == 0) ? 0.0 : s[i - 1]);
}
inline long double square(int i, int j,
                          const pair<long double, long double>& t) {
  long double res = abs(t.first * t.second * 0.5);
  res += abs(cross(p[i] - cen, p[j] - cen)) * 0.5;
  if (i <= j)
    res -= getS(i, j);
  else
    res -= getS(i, n) + getS(0, j);
  return abs(res);
}
inline long double calcSquare(vector<pair<long double, long double> > pol) {
  long double ans = 0.0;
  pol.push_back(pol[0]);
  for (int i = 0; i < int(int((pol).size()) - 1); i++)
    ans += (pol[i + 1].first - pol[i].first) *
           (pol[i + 1].second + pol[i].second) * 0.5;
  return abs(ans);
}
inline long double det(long double ax, long double ay, long double bx,
                       long double by) {
  return ax * by - ay * bx;
}
inline pair<long double, long double> intersect(
    const pair<long double, long double>& a,
    const pair<long double, long double>& b,
    const pair<long double, long double>& c) {
  long double A1 = b.second - a.second, B1 = a.first - b.first,
              C1 = -(a.first * A1 + a.second * B1);
  long double A2 = B1, B2 = -A1, C2 = -(A2 * c.first + B2 * c.second);
  long double d = det(A1, B1, A2, B2);
  if (abs(d) < EPS) return c;
  long double x = det(-C1, B1, -C2, B2) / d;
  long double y = det(A1, -C1, A2, -C2) / d;
  return make_pair((x), (y));
}
int main() {
  cin >> n;
  for (int i = 0; i < int(n); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    p[i] = make_pair((x), (y));
  }
  long double ans = 1e15;
  for (int k = 0; k < int(2); k++) {
    for (int i = 0; i < int(n); i++) p[i].first *= -1.0;
    if (turnRight(p[0], p[1], p[2])) reverse(p, p + n);
    cen = make_pair((0.0), (0.0));
    for (int i = 0; i < int(n); i++) cen = cen + p[i];
    cen = cen / n;
    s[0] = cross(p[0] - cen, p[1] - cen) * 0.5;
    for (int i = 1; i <= int(n - 1); i++)
      s[i] = s[i - 1] + cross(p[i] - cen, p[(i + 1) % n] - cen) * 0.5;
    pair<long double, long double> e1 = norm(p[1] - p[0]),
                                   e2 = make_pair((-e1.second), (e1.first));
    int idx = 0;
    for (int i = 0; i < int(n); i++)
      if (inBasis(e1, e2, p[i] - p[0]) < inBasis(e1, e2, p[idx] - p[0]))
        idx = i;
    ans = min(ans, square(idx, 0, inBasis(e1, e2, p[idx] - p[0])));
    for (int i = 1; i <= int(n - 1); i++) {
      int nexti = i + 1 == n ? 0 : i + 1;
      e1 = norm(p[nexti] - p[i]), e2 = make_pair((-e1.second), (e1.first));
      while (inBasis(e1, e2, p[(idx + 1) % n] - p[i]) <
             inBasis(e1, e2, p[idx] - p[i]))
        idx = (idx + 1) % n;
      ans = min(ans, square(idx, i, inBasis(e1, e2, p[idx] - p[i])));
    }
  }
  cout << setprecision(10) << fixed;
  cout << ans << endl;
  return 0;
}