#include using namespace std; typedef long long ll; typedef double ld; struct point { ll x; ll y; ll index; }; auto cmp_top = [](point &left, point &right) { if (left.y != right.y) return left.y < right.y; return left.x > right.x; }; auto cmp_left = [](point &left, point &right) { if (left.x != right.x) return left.x < right.x; return left.y < right.y; }; auto cmp_bottom = [](point &left, point &right) { if (left.y != right.y) return left.y > right.y; return left.x < right.x; }; auto cmp_right = [](point &left, point &right) { if (left.x != right.x) return left.x > right.x; return left.x > right.x; }; priority_queue, decltype(cmp_top)> queue_top(cmp_top); priority_queue, decltype(cmp_right)> queue_right(cmp_right); priority_queue, decltype(cmp_bottom)> queue_bottom(cmp_bottom); priority_queue, decltype(cmp_left)> queue_left(cmp_left); template point pop(priority_queue, T> &q, vector &used) { while (q.size() > 0) { point current = q.top(); q.pop(); if (!used[current.index]) { used[current.index] = true; return current; } } assert(false); } ld get_length(point a, point b) { return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); } ld get_area(point a, point b, point c) { return get_length(a, b) * get_length(b, c); } int main() { ll N; cin >> N; ll index = 0; vector used(N); for (ll i = 0; i < N; i++) { ll x, y; cin >> x >> y; point p = {x, y, index}; index++; queue_top.push(p); queue_left.push(p); queue_bottom.push(p); queue_right.push(p); } for (ll i = 0; i < N / 4 - 1; i++) { pop(queue_top, used); pop(queue_right, used); pop(queue_bottom, used); pop(queue_left, used); } point top = pop(queue_top, used); point right = pop(queue_right, used); point bottom = pop(queue_bottom, used); point left = pop(queue_left, used); assert(get_length(top, right) == get_length(left, bottom)); cout << (ll)round(get_area(top, right, bottom)) << endl; return 0; }