#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
const double PI = acos(-1.0);
const long long INF = 1e9 + 47;
const long long LINF = INF * INF;
const int MAX = 1 << 20;
int n;
long long a[MAX];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = (0); i < (2 * n); ++i) cin >> a[i];
  sort(a, a + 2 * n);
  long long ans = LINF;
  for (int i = (0); i < (n); ++i) {
    long long x = a[i + n - 1] - a[i];
    long long y = a[2 * n - 1];
    if (i)
      y -= a[0];
    else
      y -= a[n];
    ans = min(ans, x * y);
  }
  cout << ans << endl;
  cerr << "Time elapsed : " << clock() / (double)CLOCKS_PER_SEC << endl;
  return 0;
}
