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;
namespace geometry {
const double pi = acos(-1);
inline int sign(const double &x) {
  return x >= 1e-3 ? 1 : (x <= -1e-3 ? -1 : 0);
}
inline bool is0(const double &x) { return sign(x) == 0; }
inline double sqr(const double &x) { return x * x; }
inline bool eql(const double &a, const double &b) { return is0(a - b); }
struct point {
  double x, y;
  point() {}
  point(double x, double y) : x(x), y(y) {}
  inline friend bool operator==(const point &a, const point &b) {
    return eql(a.x, b.x) && eql(a.y, b.y);
  }
  inline friend point operator+(const point &a, const point &b) {
    return point(a.x + b.x, a.y + b.y);
  }
  inline friend point operator-(const point &a, const point &b) {
    return point(a.x - b.x, a.y - b.y);
  }
  inline friend point operator-(const point &a) { return point(-a.x, -a.y); }
  inline friend point operator*(const point &a, const double &k) {
    return point(k * a.x, k * a.y);
  }
  inline friend point operator*(const double &k, const point &a) {
    return point(k * a.x, k * a.y);
  }
  inline friend point operator/(const point &a, const double &k) {
    return point(a.x / k, a.y / k);
  }
  inline double alpha() const {
    double ret = atan2(y, x);
    return eql(ret, -pi) ? pi : ret;
  }
  inline void in() {
    scanf("%lf%lf", &x, &y);
    return;
  }
  inline void out(int p = 0) const {
    if (p >= 10) {
      char c[6];
      c[0] = '%';
      c[1] = '.';
      c[2] = p / 10 + '0';
      c[3] = p % 10 + '0';
      c[4] = 'f';
      c[5] = 0;
      printf(c, x);
      printf(" ");
      printf(c, y);
      printf("\n");
    } else {
      char c[5];
      c[0] = '%';
      c[1] = '.';
      c[2] = p + '0';
      c[3] = 'f';
      c[4] = 0;
      printf(c, x);
      printf(" ");
      printf(c, y);
      printf("\n");
    }
  }
  inline void debug(int p = 12) const { return; }
  inline double abs2() const { return sqr(x) + sqr(y); }
  inline double abs() const { return sqrt(abs2()); }
  inline point unit() const { return *this / abs(); }
  inline point normal() const { return point(-y, x); }
};
inline point midpoint(const point &a, const point &b) { return (a + b) / 2.; }
inline point reflection(const point &a, const point &b) { return 2. * b - a; }
inline double dot(const point &a, const point &b) {
  return a.x * b.x + a.y * b.y;
}
inline double det(const point &a, const point &b) {
  return a.x * b.y - a.y * b.x;
}
inline point rotCW(const point &a, const double &alpha) {
  double sina = sin(alpha), cosa = cos(alpha);
  return point(sina * a.y + cosa * a.x, cosa * a.y - sina * a.x);
}
inline point rotCCW(const point &a, const double &alpha) {
  double sina = sin(alpha), cosa = cos(alpha);
  return point(cosa * a.x - sina * a.y, sina * a.x + cosa * a.y);
}
inline double dist(const point &a, const point &b) {
  return hypot(a.x - b.x, a.y - b.y);
}
inline double dist2(const point &a, const point &b) {
  return sqr(a.x - b.x) + sqr(a.y - b.y);
}
struct line {
  int typ;
  point a, b;
  line() {}
  line(point a, point b) : a(a), b(b) { typ = 0; }
  line(point a, point b, int typ) : a(a), b(b), typ(typ) {}
  inline void in(int T = 0) {
    a.in();
    b.in();
    typ = T;
    return;
  }
  inline point dir() const { return b - a; }
};
inline bool on(const point &p, const line &l) {
  bool f = is0(det(p - l.a, l.b - l.a));
  if (!f) {
    return 0;
  }
  if (l.typ == 0) {
    return 1;
  }
  if (l.typ == 1) {
    return sign(dot(l.a - p, l.b - p)) <= 0;
  }
  return sign(dot(p - l.a, l.b - l.a)) >= 0;
}
inline vector<point> inter(const line &l1, const line &l2) {
  if (is0(det(l1.dir(), l2.dir()))) {
    return vector<point>();
  }
  double s1 = det(l2.a - l1.a, l2.b - l1.a), s2 = det(l2.b - l1.b, l2.a - l1.b);
  point t = l1.a + (l1.b - l1.a) * (s1 / (s1 + s2));
  return on(t, l1) && on(t, l2) ? vector<point>(1, t) : vector<point>();
}
inline line midpointnormal(const line &l) {
  point a = midpoint(l.a, l.b), b = l.dir().normal() + a;
  return line(a, b);
}
inline point projection(const point &p, const line &l) {
  point un = l.dir().unit();
  return l.a + dot(p - l.a, un) * un;
}
inline point reflection(const point &p, const line &l) {
  return reflection(p, projection(p, l));
}
struct circle {
  point o;
  double r;
  circle() {}
  circle(point o, double r) : o(o), r(r) {}
  inline void in() {
    o.in();
    scanf("%lf", &r);
    return;
  }
};
inline int pos(const point &p, const circle &c) {
  return sign(dist2(p, c.o) - sqr(c.r));
}
inline bool on(const point &p, const circle &c) { return pos(p, c) == 0; }
inline vector<point> inter(const line &l, const circle &c) {
  vector<point> ret;
  point p = projection(c.o, l);
  int t = pos(p, c);
  if (t > 0) {
    return ret;
  }
  if (t == 0) {
    return on(p, l) ? vector<point>(1, p) : ret;
  }
  point a = p + (l.a - l.b).unit() * sqrt(sqr(c.r) - dist2(c.o, p)),
        b = p * 2 - a;
  if (on(a, l)) {
    ret.push_back(a);
  }
  if (on(b, l)) {
    ret.push_back(b);
  }
  return ret;
}
inline vector<point> inter(const circle &c, const line &l) {
  return inter(l, c);
}
inline vector<point> inter(const circle &c1, const circle &c2) {
  vector<point> ret;
  if (c1.o == c2.o) {
    return ret;
  }
  point p = c1.o + (c2.o - c1.o).unit() *
                       ((sqr(c1.r) - sqr(c2.r) + dist2(c1.o, c2.o)) /
                        (2. * dist(c1.o, c2.o)));
  vector<point> foo = inter(line(p, p + (c2.o - c1.o).normal()), c1);
  for (const auto &x : foo) {
    if (on(x, c1) && on(x, c2)) {
      ret.push_back(x);
    }
  }
  return ret;
}
inline vector<line> tangent(const point &p, const circle &c) {
  int sgn = pos(p, c);
  if (sgn == -1) {
    return vector<line>();
  }
  if (sgn == 0) {
    return vector<line>(1, line(p, (c.o - p).normal() + p));
  }
  circle C = circle(midpoint(p, c.o), dist(p, c.o) / 2.);
  vector<point> t = inter(c, C);
  vector<line> ret;
  for (auto &o : t) {
    ret.push_back(line(p, o));
  }
  return ret;
}
inline vector<line> tangent(const circle &c, const point &p) {
  return tangent(p, c);
}
inline vector<line> ext_common_tangent(const circle &c1, const circle &c2) {
  vector<line> ret;
  int sgn = sign(c1.r - c2.r);
  if (!sgn) {
    if (c1.o == c2.o) {
      return ret;
    }
    line l = line(c1.o, c2.o);
    point dir = l.dir().normal().unit() * c1.r;
    ret.push_back(line(l.a + dir, l.b + dir));
    ret.push_back(line(l.a - dir, l.b - dir));
    return ret;
  }
  if (sgn > 0) {
    return ext_common_tangent(c2, c1);
  }
  circle c = circle(c2.o, c2.r - c1.r);
  vector<line> tmp = tangent(c1.o, c);
  for (auto &l : tmp) {
    point dir = l.dir().normal().unit() * c1.r;
    line nl = line(l.a + dir, l.b + dir);
    if (inter(nl, c2).size() == 1) {
      ret.push_back(nl);
    } else {
      ret.push_back(line(l.a - dir, l.b - dir));
    }
  }
  return ret;
}
inline vector<line> int_common_tangent(const circle &c1, const circle &c2) {
  vector<line> ret;
  circle c = circle(c2.o, c2.r + c1.r);
  vector<line> tmp = tangent(c1.o, c);
  for (auto &l : tmp) {
    point dir = l.dir().normal().unit() * c1.r;
    line nl = line(l.a + dir, l.b + dir);
    if (inter(nl, c2).size() == 1) {
      ret.push_back(nl);
    } else {
      ret.push_back(line(l.a - dir, l.b - dir));
    }
  }
  return ret;
}
inline vector<line> common_tangent(const circle &c1, const circle &c2) {
  auto ret = ext_common_tangent(c1, c2);
  auto foo = int_common_tangent(c1, c2);
  ret.insert(ret.end(), foo.begin(), foo.end());
  return ret;
}
}  // namespace geometry
using namespace geometry;
int n;
vector<point> polygon;
double ans = 1e60;
void upd(int i, int j, double s) {
  point p = projection(polygon[j], line(polygon[i], polygon[(i + 1) % n]));
  s += det(polygon[i], polygon[j]);
  s = fabs(det(polygon[j] - polygon[i], p - polygon[i])) - fabs(s);
  ans = min(ans, s);
  return;
}
void solve() {
  int j = 0;
  double mx = -1e60, s = 0, cur_s = 0;
  for (int i = 0; i < n; ++i) {
    double t = dot(polygon[i] - polygon[0], polygon[1] - polygon[0]);
    if (i) {
      cur_s += det(polygon[i], polygon[i - 1]);
    }
    if (t > mx) {
      j = i;
      mx = t;
      s = cur_s;
    }
  }
  upd(0, j, s);
  for (int i = 1; i < n; ++i) {
    s -= det(polygon[i], polygon[(i + n - 1) % n]);
    point base = polygon[(i + 1) % n] - polygon[i];
    for (;;) {
      int k = (j + 1) % n;
      double t = dot(polygon[k] - polygon[i], base);
      if (t > dot(polygon[j] - polygon[i], base)) {
        s += det(polygon[k], polygon[j]);
        j = k;
      } else {
        break;
      }
    }
    upd(i, j, s);
  }
  return;
}
int main() {
  scanf("%d", &n);
  polygon.resize(n);
  for (int i = 0; i < n; ++i) {
    polygon[i].in();
  }
  solve();
  reverse(polygon.begin(), polygon.end());
  solve();
  printf("%.12f\n", .5 * ans);
  return 0;
}