#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n * 2);
  for (long long i = 0; i < n * 2; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  long long ans = (a[n - 1] - a[0]) * (a[2 * n - 1] - a[n]);
  long long x = a[2 * n - 1] - a[0];
  for (long long i = 1; i <= n; ++i) {
    ans = min((a[i + n - 1] - a[i]) * x, ans);
  }
  cout << ans;
  return 0;
}
