#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> w(2 * n);
  for (int i = 0; i < 2 * n; i++) cin >> w[i];
  sort(w.begin(), w.end());
  int ans = INT_MAX;
  for (int i = 0; i < 2 * n - 1; i++) {
    for (int j = i + 1; j < 2 * n; j++) {
      int ins = 0;
      vector<int> val;
      val.reserve(2 * n - 2);
      for (int k = 0; k < 2 * n; k++) {
        if (k != i && k != j) val.push_back(w[k]);
      }
      for (int k = 0; k < 2 * n - 3; k += 2) ins += val[k + 1] - val[k];
      ans = min(ans, ins);
    }
  }
  cout << ans << '\n';
  cin.ignore(numeric_limits<streamsize>::max(), '\n');
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  solve();
  return 0;
}
