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;
struct iii {
  int a, b, c;
  iii() {}
  iii(int a, int b, int c) : a(a), b(b), c(c) {}
  bool operator<(const iii& e) const {
    return a < e.a || a == e.a && (b < e.b || b == e.b && c < e.c);
  }
};
template <typename T>
T sq(const T& x) {
  return x * x;
}
template <typename T>
void minl(T& a, const T& b) {
  if (a > b) a = b;
}
template <typename T>
void maxl(T& a, const T& b) {
  if (a < b) a = b;
}
template <typename T>
void operator+=(vector<T>& a, const T& x) {
  a.push_back(x);
}
template <typename T>
void operator+=(set<T>& a, const T& x) {
  a.insert(x);
}
template <typename T>
bool operator&(const set<T>& a, const T& x) {
  return a.find(x) != a.end();
}
template <typename A, typename B>
istream& operator>>(istream& i, pair<A, B>& v) {
  return i >> v.first >> v.second;
}
pair<int, int> operator+(const pair<int, int>& a, const pair<int, int>& b) {
  return pair<int, int>(a.first + b.first, a.second + b.second);
}
pair<int, int> operator-(const pair<int, int>& a, const pair<int, int>& b) {
  return pair<int, int>(a.first - b.first, a.second - b.second);
}
template <typename T>
void usort(vector<T>& a) {
  sort((a).begin(), (a).end());
  a.erase(unique((a).begin(), (a).end()), a.end());
}
template <typename T>
int index(const vector<T>& a, const T& x) {
  return lower_bound((a).begin(), (a).end(), x) - a.begin();
}
template <typename T>
T gcd(T a, T b) {
  while (b) {
    T t = a % b;
    a = b;
    b = t;
  }
  return a;
}
long long cross(const pair<int, int>& a, const pair<int, int>& b) {
  return (long long)a.first * b.second - (long long)b.first * a.second;
}
long long dot(const pair<int, int>& a, const pair<int, int>& b) {
  return (long long)a.first * b.first + (long long)a.second * b.second;
}
int bitcnt(unsigned x) { return __builtin_popcount(x); }
int bitlow(unsigned x) { return __builtin_ffs(x); }
const double APS = 1e-10;
const double EPS = 1e-7;
const double PI = acos(-1.0);
inline int sgn(double x) { return x < -EPS ? -1 : x > EPS; }
struct Point {
  double x, y;
  Point() {}
  Point(const double& x, const double& y) : x(x), y(y) {}
  bool operator==(const Point& rs) const {
    return sgn(x - rs.x) == 0 && sgn(y - rs.y) == 0;
  }
  bool operator<(const Point& rs) const {
    return x + EPS < rs.x || x < rs.x + EPS && y + EPS < rs.y;
  }
  Point operator+(const Point& rhs) const {
    return Point(x + rhs.x, y + rhs.y);
  }
  Point operator-(const Point& rhs) const {
    return Point(x - rhs.x, y - rhs.y);
  }
  Point operator*(const double& k) const { return Point(x * k, y * k); }
  Point operator/(const double& k) const { return Point(x / k, y / k); }
  double len2() const { return x * x + y * y; }
  double len() const { return sqrt(len2()); }
  Point to(const double& k) const { return (*this) * (k / len()); }
  Point turn_left() { return Point(-y, x); }
  Point turn_right() { return Point(y, -x); }
  bool read() { return scanf("%lf%lf", &x, &y) != EOF; }
  void print() { printf("%.2f %.2f\n", x, y); }
};
inline double cross(Point p1, Point p2) { return p1.x * p2.y - p2.x * p1.y; }
inline double dot(Point p1, Point p2) { return p1.x * p2.x + p1.y * p2.y; }
bool inter(Point a, Point b, Point c, Point d, Point& x) {
  double s1 = cross(b - a, c - a);
  double s2 = cross(b - a, d - a);
  if (sgn(s2 - s1) == 0) return false;
  x = Point(c.x * s2 - d.x * s1, c.y * s2 - d.y * s1) / (s2 - s1);
  return true;
}
Point foot(Point p, Point s1, Point s2) {
  Point t;
  inter(p, p + (s2 - s1).turn_left(), s1, s2, t);
  return t;
}
double area_triangle(Point p1, Point p2, Point p3) {
  return fabs(cross(p1 - p3, p2 - p3)) / 2;
}
int n;
Point p[50000];
double burn() {
  Point x;
  int a = 0;
  int b = 1;
  Point r = (p[b] - p[a]).turn_right();
  int u = 1, v = ((u) + 1 < (n) ? (u) + 1 : 0);
  double s = 0;
  while (cross(r, p[v] - p[u]) > EPS) {
    s += area_triangle(p[b], p[u], p[v]);
    u = v;
    v = ((u) + 1 < (n) ? (u) + 1 : 0);
  }
  inter(p[a], p[b], p[u], p[u] + r, x);
  double ret = area_triangle(p[b], p[u], x) - s;
  while (1) {
    s -= area_triangle(p[b], p[((b) + 1 < (n) ? (b) + 1 : 0)], p[u]);
    a = b;
    b = ((a) + 1 < (n) ? (a) + 1 : 0);
    if (a == 0) break;
    r = (p[b] - p[a]).turn_right();
    while (cross(r, p[v] - p[u]) > EPS) {
      s += area_triangle(p[b], p[u], p[v]);
      u = v;
      v = ((u) + 1 < (n) ? (u) + 1 : 0);
    }
    inter(p[a], p[b], p[u], p[u] + r, x);
    double d = area_triangle(p[b], p[u], x) - s;
    minl(ret, d);
  }
  return ret;
}
void york() {
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i) p[i].read();
  if (cross(p[1] - p[0], p[2] - p[0]) > 0) reverse(p, p + n);
  double s1 = burn();
  for (int i = 0; i < (n); ++i) p[i].y = -p[i].y;
  reverse(p, p + n);
  double s2 = burn();
  double ans = min(s1, s2);
  printf("%.10f", ans);
}
int main() {
  ios_base::sync_with_stdio(false);
  york();
  return 0;
}