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