#include using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define fo(i, n) rep(i, 0, n) #define F first #define S second #define MP make_pair typedef long long ll; typedef pair pii; typedef pair pll; typedef vector vi; typedef vector vll; vector gone; struct axis { vector> points; ll start = 0; ll end = 0; void trim() { while (gone[points[start].second]) start++; while (gone[points[end].second]) end--; } void pop() { trim(); gone[points[start].second] = true; start++; gone[points[end].second] = true; end--; } ll length() { return points[end].first.first - points[start].first.first; } }; double power(double n) { return n * n; } double dist(pll a, pll b) { return sqrt(power(a.F - b.F) + power(a.S - b.S)); } int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); ll n; cin >> n; gone = vector(n); axis x; axis y; vector points; for (ll i = 0; i < n; i++) { ll px, py; cin >> px >> py; x.points.push_back(MP(MP(px, py), i)); y.points.push_back(MP(MP(py, -px), i)); points.push_back(MP(px, py)); } x.end = n - 1; y.end = n - 1; std::sort(all(x.points)); std::sort(all(y.points)); for (ll phase = 0; phase < n / 4 - 1; phase++) { x.pop(); y.pop(); } x.trim(); y.trim(); ll base = x.length() * y.length(); ll a = x.points[x.start].second; ll b = x.points[x.end].second; ll c = y.points[y.end].second; ll d = y.points[y.start].second; cerr << a << ' ' << b << ' ' << c << ' ' << d << endl; double result = dist(points[a], points[c]) * dist(points[c], points[b]); cout << ll(result + 0.5) << endl; }