#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ar[105];
  cin >> n;
  for (int i = 0; i < 2 * n; i++) cin >> ar[i];
  sort(ar, ar + 2 * n);
  int mn = INT_MAX, ci, pv;
  for (int i = 0; i < 2 * n; i++) {
    for (int j = 0; j < 2 * n; j++) {
      if (i == j) continue;
      ci = 0;
      pv = -1;
      for (int k = 0; k < 2 * n; k++) {
        if (k != i && k != j) {
          if (pv == -1)
            pv = ar[k];
          else {
            ci += ar[k] - pv;
            pv = -1;
          }
        }
      }
      if (ci < mn) mn = ci;
    }
  }
  cout << mn;
}
