#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 210000;
const int inf = 1 << 30;
int x[maxn], y[maxn], n;
long long get_ans() {
	int xmin = inf, xmax = -inf, ymin = inf, ymax = -inf;
	for (int i = 1; i <= n; ++i) {
		int a, b;
		if (rand() % 2) {
			a = x[i], b = y[i];
		}
		else {
			a = y[i], b = x[i];
		}
		xmin = min(xmin, a);
		xmax = max(xmax, a);
		ymin = min(ymin, b);
		ymax = max(ymax, b);
	}
	//printf("%d %d %d %d\n", xmin, xmax, ymin, ymax);
	return static_cast<long long>(xmax - xmin) * static_cast<long long>(ymax - ymin);
}
int main() {
	//freopen("in.txt", "r", stdin);
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i)
		scanf("%d %d", &x[i], &y[i]);
	long long ans = 1LL << 62;
	for (int i = 1; i <= 20; ++i) {
		ans = min(ans, get_ans());
	}
	printf("%lld\n", ans);
	return 0;
}