#include <bits/stdc++.h>
using namespace std;
bool IsPrime(long long x) {
  bool isPrime = true;
  for (long long a = 2; a * a <= x; a++) {
    if (x % a == 0) return false;
  }
  return true;
}
vector<long long> v[10005], y, x;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k = 1000000;
  cin >> n;
  long long a[2 * n], b[2 * n - 2];
  for (long long i = 0; i < 2 * n; i++) cin >> a[i];
  sort(a, a + 2 * n);
  for (long long i = 0; i < 2 * n; i++) {
    for (long long(j) = (i + 1); j < (2 * n); j++) {
      long long p = 0, s = 0;
      for (long long k = 0; k < 2 * n; k++) {
        if (k != i && k != j) {
          b[p] = a[k];
          p++;
        }
      }
      for (long long l = 0; l < 2 * n - 2; l++) {
        s += abs(b[l] - b[l + 1]);
        l++;
      }
      k = min(s, k);
    }
  }
  cout << k;
}
