#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(2 * n);
  for (int i = 0; i < 2 * n; i++) scanf("%d", &a[i]);
  sort(a.begin(), a.end());
  int f = 1;
  for (int i = 1; i < 2 * n; i++) {
    if (f >= n) {
      printf("0\n");
      return 0;
    }
    if (a[i] == a[i - 1])
      f++;
    else
      f = 1;
  }
  if (f >= n) {
    printf("0\n");
    return 0;
  }
  long long int res = (long long int)2e18;
  deque<int> dq;
  for (int i = 0; i < n; i++) dq.push_back(a[i]);
  res = min(res, abs(dq.front() - dq.back()) * 1LL * abs(a[n] - a[2 * n - 1]));
  for (int i = n; i < 2 * n - 1; i++) {
    dq.pop_front();
    dq.push_back(a[i]);
    res =
        min(res, abs(dq.front() - dq.back()) * 1LL * abs(a[0] - a[2 * n - 1]));
  }
  dq.pop_front();
  dq.push_back(a[2 * n - 1]);
  res = min(res, abs(dq.front() - dq.back()) * 1LL * abs(a[0] - a[n - 1]));
  cout << res << endl;
  return 0;
}
