{"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 记录中的点数。第二行包含 $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} $, $ n \\geq 1 $, be the number of stars.  \nLet $ A = \\{a_1, a_2, \\dots, a_{2n}\\} $ be a multiset of $ 2n $ positive integers representing the coordinates of the $ n $ points (each point has an $ x $- and a $ y $-coordinate), given in arbitrary order.\n\nLet $ P = \\{(x_i, y_i)\\}_{i=1}^n $ be a partition of $ A $ into $ n $ unordered pairs, where each pair represents the coordinates of one star.\n\n**Constraints**  \n- Each element of $ A $ is used exactly once in some pair.  \n- Each pair $ (x_i, y_i) $ corresponds to a point in $ \\mathbb{R}^2 $.  \n\n**Objective**  \nFind the minimum possible area of an axis-aligned rectangle that can contain all points in some valid partition $ P $, i.e., minimize:  \n$$\n(\\max_i x_i - \\min_i x_i) \\cdot (\\max_i y_i - \\min_i y_i)\n$$  \nover all possible ways to partition $ A $ into $ n $ unordered pairs $ (x_i, y_i) $.\n\n**Note**: The rectangle’s corners are $ (\\min x_i, \\min y_i) $ and $ (\\max x_i, \\max y_i) $.","simple_statement":null,"has_page_source":false}