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 EPS = 10e-11;
double PI = acos(-1);
class VagueDouble {
 public:
  double vd;
  VagueDouble() { vd = nan(""); }
  VagueDouble(const double d) { vd = d; }
  inline VagueDouble operator-() const { return VagueDouble(-vd); }
  inline VagueDouble operator+(const VagueDouble VD) const {
    return VagueDouble(vd + VD.vd);
  }
  inline VagueDouble operator-(const VagueDouble VD) const {
    return VagueDouble(vd - VD.vd);
  }
  inline VagueDouble operator*(const VagueDouble VD) const {
    return VagueDouble(vd * VD.vd);
  }
  inline VagueDouble operator/(const VagueDouble VD) const {
    return VagueDouble(vd / VD.vd);
  }
  inline VagueDouble operator+(const double d) const {
    return VagueDouble(vd + d);
  }
  inline VagueDouble operator-(const double d) const {
    return VagueDouble(vd - d);
  }
  inline VagueDouble operator*(const double d) const {
    return VagueDouble(vd * d);
  }
  inline VagueDouble operator/(const double d) const {
    return VagueDouble(vd / d);
  }
  inline bool operator<(const VagueDouble VD) const {
    return vd + EPS < VD.vd && vd + EPS * abs(vd) < VD.vd;
  }
  inline bool operator>(const VagueDouble VD) const {
    return vd - EPS > VD.vd && vd - EPS * abs(vd) > VD.vd;
  }
  inline bool operator==(const VagueDouble VD) const {
    return !(*this < VD.vd) && !(*this > VD.vd);
  }
  inline bool operator<=(const VagueDouble VD) const {
    return !(*this > VD.vd);
  }
  inline bool operator>=(const VagueDouble VD) const {
    return !(*this < VD.vd);
  }
  inline bool operator<(const double d) const { return *this < VagueDouble(d); }
  inline bool operator>(const double d) const { return *this > VagueDouble(d); }
  inline bool operator==(const double d) const {
    return *this == VagueDouble(d);
  }
  inline bool operator<=(const double d) const {
    return *this <= VagueDouble(d);
  }
  inline bool operator>=(const double d) const {
    return *this >= VagueDouble(d);
  }
  inline void operator+=(const VagueDouble VD) { *this = *this + VD; }
  inline void operator-=(const VagueDouble VD) { *this = *this - VD; }
  inline void operator*=(const VagueDouble VD) { *this = *this * VD; }
  inline void operator/=(const VagueDouble VD) { *this = *this / VD; }
  inline friend VagueDouble operator+(const double d, const VagueDouble &VD) {
    return VagueDouble(d) + VD;
  }
  inline friend VagueDouble operator-(const double d, const VagueDouble &VD) {
    return VagueDouble(d) - VD;
  }
  inline friend VagueDouble operator*(const double d, const VagueDouble &VD) {
    return VagueDouble(d) * VD;
  }
  inline friend VagueDouble operator/(const double d, const VagueDouble &VD) {
    return VagueDouble(d) / VD;
  }
  inline friend bool operator<(const double d, const VagueDouble &VD) {
    return VagueDouble(d) < VD;
  }
  inline friend bool operator>(const double d, const VagueDouble &VD) {
    return VagueDouble(d) > VD;
  }
  inline friend bool operator==(const double d, const VagueDouble &VD) {
    return VagueDouble(d) == VD;
  }
  inline friend bool operator<=(const double d, const VagueDouble &VD) {
    return VagueDouble(d) <= VD;
  }
  inline friend bool operator>=(const double d, const VagueDouble &VD) {
    return VagueDouble(d) >= VD;
  }
  inline friend std::ostream &operator<<(std::ostream &os,
                                         const VagueDouble VD) {
    os << VD.vd;
    return os;
  }
  inline friend std::istream &operator>>(std::istream &is, VagueDouble &VD) {
    double d;
    is >> d;
    VD = VagueDouble(d);
    return is;
  }
  inline double to_double() { return vd; }
};
inline VagueDouble abs(VagueDouble VD) {
  return (VD.vd < 0) ? (-VD.vd) : VD.vd;
}
inline VagueDouble sqr(VagueDouble VD) { return VD.vd * VD.vd; }
inline VagueDouble sqr(double d) { return d * d; }
inline VagueDouble sqrt(VagueDouble VD) { return VagueDouble(sqrt(VD.vd)); }
inline bool isnan(VagueDouble VD) { return isnan(VD.vd); }
class P {
 public:
  VagueDouble x, y;
  P() {
    x = nan("");
    y = nan("");
  }
  P(double _x, double _y) {
    x = _x;
    y = _y;
  }
  P(VagueDouble _x, VagueDouble _y) {
    x = _x;
    y = _y;
  }
  P operator-() const { return P(-x, -y); }
  P operator+(const P p) const { return P(x + p.x, y + p.y); }
  P operator-(const P p) const { return P(x - p.x, y - p.y); }
  P operator*(const double d) const { return P(x * d, y * d); }
  P operator/(const double d) const { return P(x / d, y / d); }
  bool operator<(const P &p) const {
    return (x == p.x) ? (y < p.y) : (x < p.x);
  }
  bool operator>(const P &p) const {
    return (x == p.x) ? (y > p.y) : (x > p.x);
  }
  bool operator==(const P &p) const { return (x == p.x) && (y == p.y); }
  void operator+=(const P &p) { *this = *this + p; }
  void operator-=(const P &p) { *this = *this - p; }
  void operator*=(const double &p) { *this = *this * p; }
  void operator/=(const double &p) { *this = *this / p; }
  friend std::ostream &operator<<(std::ostream &os, const P &p) {
    os << p.x.vd << "," << p.y.vd;
    return os;
  }
  friend std::istream &operator>>(std::istream &is, P &p) {
    double _x, _y;
    is >> _x >> _y;
    p = P(_x, _y);
    return is;
  }
  VagueDouble length() { return sqrt(x * x + y * y); }
  VagueDouble operator*(const P p) const { return x * p.x + y * p.y; }
  VagueDouble operator^(const P p) const { return x * p.y - y * p.x; }
};
inline VagueDouble dist(P p0, P p1) {
  return sqrt(sqr(p0.x - p1.x) + sqr(p0.y - p1.y));
}
inline VagueDouble area(P p0, P p1, P p2) {
  return abs((p1 - p0) ^ (p2 - p0)) * 0.5;
}
inline bool isnan(P p) { return isnan(p.x); }
VagueDouble distPL(P l0, P l1, P p) {
  if (l0 == l1) return dist(l0, p);
  return abs((p - l0) ^ (l1 - l0)) / (l1 - l0).length();
}
VagueDouble angle(P from0, P to0, P from1, P to1) {
  P v0 = to0 - from0;
  P v1 = to1 - from1;
  VagueDouble res = atan2(v1.y.vd, v1.x.vd) - atan2(v0.y.vd, v0.x.vd);
  while (res < 0) res += PI * 2.0;
  return res;
}
bool onLine(P l0, P l1, P p) {
  if (l0 == l1) return l0 == p;
  if (p.x < min(l0.x, l1.x) || max(l0.x, l1.x) < p.x) return false;
  if (p.y < min(l0.y, l1.y) || max(l0.y, l1.y) < p.y) return false;
  return distPL(l0, l1, p) == 0;
}
P findCross(P a0, P a1, P b0, P b1) {
  P a = a0 - a1, b = b0 - b1, res;
  VagueDouble den = a ^ b;
  if (den == 0) return P();
  res.x =
      (a.x * b.x * (a0.y - b0.y) + a.x * b.y * b0.x - a.y * b.x * a0.x) / den;
  if (res.x < min(a0.x, a1.x) || max(a0.x, a1.x) < res.x) return P();
  if (res.x < min(b0.x, b1.x) || max(b0.x, b1.x) < res.x) return P();
  res.y =
      -(a.y * b.y * (a0.x - b0.x) + a.y * b.x * b0.y - a.x * b.y * a0.y) / den;
  if (res.y < min(a0.y, a1.y) || max(a0.y, a1.y) < res.y) return P();
  if (res.y < min(b0.y, b1.y) || max(b0.y, b1.y) < res.y) return P();
  return res;
}
class Polygon {
 public:
  vector<P> points;
  Polygon() {}
  Polygon(vector<P> vec) { points = vec; }
  Polygon(long long int num) { points.resize(num); }
  friend std::ostream &operator<<(std::ostream &os, Polygon &poly) {
    for (long long int i = 0;
         i < ((long long int)(((long long int)(poly).size()))); ++i)
      os << poly[i] << " ";
    return os;
  }
  friend std::istream &operator>>(std::istream &is, Polygon &poly) {
    for (long long int i = 0;
         i < ((long long int)(((long long int)(poly).size()))); ++i)
      is >> poly[i];
    return is;
  }
  long long int size() { return ((long long int)(points).size()); }
  P &operator[](long long int pos) { return points[pos]; }
  bool onPoly(P p) {
    long long int n = ((long long int)(points).size());
    if (onLine(points[n - 1], points[0], p)) return true;
    for (long long int i = 0; i < ((long long int)(n - 1)); ++i)
      if (onLine(points[i], points[i + 1], p)) return true;
    return false;
  }
  bool inPoly(P p) {
    long long int n = ((long long int)(points).size());
    if (n == 0) return false;
    if (onPoly(p)) return true;
    P right_point = p;
    for (long long int i = 0; i < ((long long int)(n)); ++i)
      right_point.x = max(right_point.x, points[i].x);
    if (right_point == p) return false;
    long long int cnt = 0;
    for (long long int i = 0, next = 1; i < n; i++, next++) {
      if (next == n) next = 0;
      if (0 < (points[i].y - p.y) * (points[next].y - p.y)) continue;
      P cross = findCross(points[i], points[next], p, right_point);
      if (!isnan(cross)) cnt++;
    }
    for (long long int i = 0;
         i < ((long long int)(((long long int)(points).size()))); ++i)
      if (onLine(p, right_point, points[i])) {
        VagueDouble dy0 = points[(i - 1 + n) % n].y - p.y;
        VagueDouble dy1 = points[(i + 1 + n) % n].y - p.y;
        if (dy0 * dy1 < 0) cnt++;
      }
    return (cnt & 1);
  }
  void convexReform() {
    long long int k = 0;
    if (((long long int)(points).size()) <= 1) return;
    sort(points.begin(), points.end());
    vector<P> ans(2 * ((long long int)(points).size()));
    for (long long int i = 0; i < ((long long int)(points).size());
         ans[k++] = points[i++]) {
      while (2 <= k &&
             0 <= ((ans[k - 1] - ans[k - 2]) ^ (points[i] - ans[k - 2])))
        k--;
    }
    for (long long int i = ((long long int)(points).size()) - 2, t = k + 1;
         0 <= i; ans[k++] = points[i--]) {
      while (t <= k &&
             0 <= ((ans[k - 1] - ans[k - 2]) ^ (points[i] - ans[k - 2])))
        k--;
    }
    ans.resize(k - 1);
    points = ans;
  }
};
VagueDouble res = 10e100;
void cal(long long int num, vector<P> &base, long long int n) {
  vector<VagueDouble> sum(n * 2 + 5);
  sum[0] = 0;
  for (long long int i = 0; i < ((long long int)(n * 2 - 1)); ++i)
    sum[i + 1] = sum[i] + area(base[num], base[i % n], base[(i + 1) % n]);
  long long int right = 0;
  for (long long int i = 0; i < ((long long int)(n)); ++i) {
    while (angle(base[right], base[right + 1], base[i], base[i + 1]) * 2.0 < PI)
      right++;
    VagueDouble d =
        area(base[num], base[i], base[right]) - (sum[right] - sum[i]);
    VagueDouble dis = distPL(base[i], base[i + 1], base[right]);
    d += dis * dist(base[i], base[right]) *
         cos(angle(base[i], base[right], base[i], base[i + 1]).to_double()) *
         0.5;
    res = min(res, d);
  }
}
int main() {
  long long int n;
  cin >> n;
  Polygon poly(n);
  for (long long int i = 0; i < ((long long int)(n)); ++i) cin >> poly[i];
  for (long long int i = 0; i < ((long long int)(n)); ++i)
    swap(poly[i], poly[rand() % n]);
  for (long long int stage = 0; stage < ((long long int)(2)); ++stage) {
    for (long long int i = 0;
         i < ((long long int)(((long long int)(poly).size()))); ++i)
      poly[i].x = -poly[i].x;
    poly.convexReform();
    n = ((long long int)(poly).size());
    vector<P> base(n * 2);
    for (long long int i = 0; i < ((long long int)(n)); ++i)
      base[i + n] = base[i] = poly[i];
    cal(0, base, n);
    long long int best = 0;
    for (long long int i = 0; i < ((long long int)(n)); ++i)
      if (base[best].x < base[i].x) best = i;
    cal(best, base, n);
  }
  printf("%0.20lf\n", res.to_double());
}