{"raw_statement":[{"iden":"statement","content":"Pavel made a photo of his favourite stars in the sky. His camera takes a photo of all points of the sky that belong to some rectangle with sides parallel to the coordinate axes.\n\nStrictly speaking, it makes a photo of all points with coordinates $(x, y)$, such that $x_1 \\leq x \\leq x_2$ and $y_1 \\leq y \\leq y_2$, where $(x_1, y_1)$ and $(x_2, y_2)$ are coordinates of the left bottom and the right top corners of the rectangle being photographed. The area of this rectangle can be zero.\n\nAfter taking the photo, Pavel wrote down coordinates of $n$ of his favourite stars which appeared in the photo. These points are not necessarily distinct, there can be multiple stars in the same point of the sky.\n\nPavel has lost his camera recently and wants to buy a similar one. Specifically, he wants to know the dimensions of the photo he took earlier. Unfortunately, the photo is also lost. His notes are also of not much help; numbers are written in random order all over his notepad, so it's impossible to tell which numbers specify coordinates of which points.\n\nPavel asked you to help him to determine what are the possible dimensions of the photo according to his notes. As there are multiple possible answers, find the dimensions with the minimal possible area of the rectangle."},{"iden":"input","content":"The first line of the input contains an only integer $n$ ($1 \\leq n \\leq 100\\,000$), the number of points in Pavel's records.\n\nThe second line contains $2 \\cdot n$ integers $a_1$, $a_2$, ..., $a_{2 \\cdot n}$ ($1 \\leq a_i \\leq 10^9$), coordinates, written by Pavel in some order."},{"iden":"output","content":"Print the only integer, the minimal area of the rectangle which could have contained all points from Pavel's records."},{"iden":"examples","content":"Input\n\n4\n4 1 3 2 3 2 1 3\n\nOutput\n\n1\n\nInput\n\n3\n5 8 5 5 7 5\n\nOutput\n\n0"},{"iden":"note","content":"In the first sample stars in Pavel's records can be $(1, 3)$, $(1, 3)$, $(2, 3)$, $(2, 4)$. In this case, the minimal area of the rectangle, which contains all these points is $1$ (rectangle with corners at $(1, 3)$ and $(2, 4)$)."}],"translated_statement":[{"iden":"statement","content":"Pavel 拍了一张他最喜欢的星星在天空中的照片。他的相机拍摄的是某个与坐标轴平行的矩形区域内所有点的图像。\n\n严格来说，它拍摄的是所有满足 $x_1 lt.eq x lt.eq x_2$ 且 $y_1 lt.eq y lt.eq y_2$ 的点 $(x, y)$，其中 $(x_1, y_1)$ 和 $(x_2, y_2)$ 分别是被拍摄矩形的左下角和右上角的坐标。该矩形的面积可以为零。\n\n拍照后，Pavel 记下了出现在照片中的 $n$ 颗他最喜欢的星星的坐标。这些点不一定互不相同，天空中同一个位置可能有多个星星。\n\nPavel 最近丢失了他的相机，想买一个类似的。具体来说，他想知道之前拍摄的照片的尺寸。不幸的是，照片也丢失了。他的笔记也帮助不大；数字被随意地写在笔记本的各个地方，因此无法判断哪些数字对应哪些点的坐标。\n\nPavel 请你帮助他根据他的笔记确定照片可能的尺寸。由于可能存在多个答案，请找出矩形面积最小的可能尺寸。\n\n输入的第一行包含一个整数 $n$（$1 lt.eq n lt.eq 100 thin 000$），表示 Pavel 记录中的点数。\n\n第二行包含 $2 dot.op n$ 个整数 $a_1$, $a_2$, ..., $a_(2 dot.op n)$（$1 lt.eq a_i lt.eq 10^9$），即 Pavel 以某种顺序记录的坐标。\n\n请输出一个整数，表示可能包含 Pavel 所有记录点的矩形的最小面积。\n\n在第一个样例中，Pavel 记录的星星可以是 $(1, 3)$、$(1, 3)$、$(2, 3)$、$(2, 4)$。在这种情况下，包含所有这些点的最小矩形面积为 $1$（矩形的角点为 $(1, 3)$ 和 $(2, 4)$）。"},{"iden":"input","content":"输入的第一行包含一个整数 $n$（$1 lt.eq n lt.eq 100 thin 000$），表示 Pavel 记录中的点数。\n\n第二行包含 $2 dot.op n$ 个整数 $a_1$, $a_2$, ..., $a_(2 dot.op n)$（$1 lt.eq a_i lt.eq 10^9$），即 Pavel 以某种顺序记录的坐标。"},{"iden":"output","content":"请输出一个整数，表示可能包含 Pavel 所有记录点的矩形的最小面积。"},{"iden":"examples","content":"输入\n4\n4 1 3 2 3 2 1 3\n输出\n1\n\n输入\n3\n5 8 5 5 7 5\n输出\n0"},{"iden":"note","content":"在第一个样例中，Pavel 记录的星星可以是 $(1, 3)$、$(1, 3)$、$(2, 3)$、$(2, 4)$。在这种情况下，包含所有这些点的最小矩形面积为 $1$（矩形的角点为 $(1, 3)$ 和 $(2, 4)$）。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of stars.  \nLet $ A = \\{a_1, a_2, \\dots, a_{2n}\\} \\subset \\mathbb{Z}^+ $ be a multiset of $ 2n $ integers representing coordinates of $ n $ points in $ \\mathbb{R}^2 $, with each point $ (x_i, y_i) $ having two coordinates from $ A $, and each element of $ A $ used exactly once.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100{,}000 $  \n2. $ 1 \\leq a_i \\leq 10^9 $ for all $ i \\in \\{1, \\dots, 2n\\} $  \n3. The $ 2n $ coordinates must be partitionable into $ n $ unordered pairs $ (x_i, y_i) $, forming $ n $ points in the plane.\n\n**Objective**  \nFind the minimal possible area of an axis-aligned rectangle that can contain all $ n $ points, over all valid pairings of the coordinates. That is, minimize:  \n$$\n\\left( \\max_{i} x_i - \\min_{i} x_i \\right) \\cdot \\left( \\max_{i} y_i - \\min_{i} y_i \\right)\n$$  \nover all ways to partition $ A $ into $ n $ pairs $ (x_i, y_i) $.","simple_statement":null,"has_page_source":false}