#include <cmath>
#include <fstream>
#include <iomanip>
#include <algorithm>
#define x first
#define y second
using namespace std;
typedef pair<long double, long double> Point;
const long double oo = 1e15;
const long double Eps = 1e-12;
vector<Point> P;
int N;
long double Solution;
inline double Det(const Point A, const Point B, const Point C) {
return (B.x - A.x) * (C.y - A.y) - (B.y - A.y) * (C.x - A.x);
}
vector<Point> ConvexHull(vector<Point> points) {
int n = static_cast<int>(points.size());
vector<int> stack = vector<int>(n + 2, 0), index = vector<int>(n, 0);
vector<double> alpha = vector<double>(n, 0.0);
int origin = 0;
for (int i = 0; i < n; ++i) {
index[i] = i;
if (points[i] < points[origin])
origin = i;
}
swap(points[0], points[origin]);
for (int i = 0; i < n; ++i)
alpha[i] = atan2(points[i].y - points[0].y, points[i].x - points[0].x);
sort(index.begin() + 1, index.end(), [&alpha](const int a, const int b) -> bool {
return alpha[a] < alpha[b];
});
stack[++stack[0]] = index[0];
stack[++stack[0]] = index[1];
for (int i = 2; i < n; ++i) {
while (stack[0] > 1 && Det(points[stack[stack[0] - 1]], points[stack[stack[0]]], points[index[i]]) < Eps)
--stack[0];
stack[++stack[0]] = index[i];
}
vector<Point> hull;
for (int i = 1; i <= stack[0]; ++i)
hull.push_back(points[stack[i]]);
return hull;
}
inline void GetEquation(const Point P1, const Point P2, long double &m, long double &n) {
m = (P2.y - P1.y)/(P2.x - P1.x);
n = P1.y - m * P1.x;
}
inline Point Project(const Point P1, const Point P2, const Point Q) {
if (abs(P1.x - P2.x) < Eps)
return Point(P1.x, Q.y);
if (abs(P1.y - P2.y) < Eps)
return Point(Q.x, P1.y);
long double m1, n1; GetEquation(P1, P2, m1, n1);
long double m2 = -1.0 / m1, n2 = Q.y + (1.0 / m1) * Q.x;
Point I;
I.x = (n2 - n1) / (m1 - m2);
I.y = m1 * I.x + n1;
return I;
}
inline long double Distance(const Point P1, const Point P2) {
return sqrt((P1.x - P2.x) * (P1.x - P2.x) + (P1.y - P2.y) * (P1.y - P2.y));
}
inline long double LineDistance(const Point P1, const Point P2, const Point Q) {
if (abs(P1.x - P2.x) < Eps)
return abs(Q.x - P1.x);
if (abs(P1.y - P2.y) < Eps)
return abs(Q.y - P1.y);
long double m, n; GetEquation(P1, P2, m, n);
long double a = m, b = -1, c = n;
return abs(a * Q.x + b * Q.y + c) / sqrt(a * a + b * b);
}
inline int Next(const int index) {
return (index + 1) % N;
}
void Solve() {
P = ConvexHull(P);
N = int(P.size());
P.push_back(P.front());
Solution = oo;
int l = 0, r = 0;
for (int i = 1; i < N; ++i) {
if (Project(P[0], P[1], P[l]) > Project(P[0], P[1], P[i]))
l = i;
if (Project(P[0], P[1], P[r]) < Project(P[0], P[1], P[i]))
r = i;
}
for (int i = 0, h = 2; i < N; ++i) {
while (Next(h) != i && LineDistance(P[i], P[i + 1], P[h]) <= LineDistance(P[i], P[i + 1], P[Next(h)]) + Eps)
h = Next(h);
while ((Project(P[i], P[i + 1], P[l]) < Project(P[i], P[i + 1], P[Next(l)])) == (P[i] > P[i + 1]))
l = Next(l);
while ((Project(P[i], P[i + 1], P[r]) < Project(P[i], P[i + 1], P[Next(r)])) == (P[i] < P[i + 1]))
r = Next(r);
long double height = LineDistance(P[i], P[i + 1], P[h]), width = Distance(Project(P[i], P[i + 1], P[l]), Project(P[i], P[i + 1], P[r]));
Solution = min(Solution, height * width);
}
}
void Read() {
ifstream cin("rubarba.in");
cin >> N;
P = vector<Point>(N);
for (int i = 0; i < N; ++i)
cin >> P[i].x >> P[i].y;
cin.close();
}
void Print() {
ofstream cout("rubarba.out");
cout << fixed << setprecision(2) << Solution << "\n";
cout.close();
}
int main() {
Read();
Solve();
Print();
return 0;
}