#include <bits/stdc++.h>
using namespace std;
const int N = 400500;
const int mod = 1e9 + 7;
const long long inf = 1e18;
int n, a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= 2 * n; ++i) cin >> a[i];
  sort(a + 1, a + 2 * n + 1);
  long long ans = 2e18;
  for (int i = 1; i <= n + 1; i++) {
    int diff = a[i + n - 1] - a[i];
    ans = min(ans, diff * 1ll *
                       (i == 1       ? a[2 * n] - a[n + 1]
                        : i == n + 1 ? a[n] - a[1]
                                     : a[2 * n] - a[1]));
  }
  cout << ans;
  return 0;
}
