#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(2 * n);
  for (auto &x : a) cin >> x;
  sort(a.begin(), a.end());
  int res = INT_MAX;
  for (int i = 0; i < 2 * n; i++) {
    for (int j = i + 1; j < 2 * n; j++) {
      int cur = 0;
      vector<int> d;
      for (int k = 0; k < 2 * n; k++) {
        if (k == i or k == j) continue;
        d.emplace_back(a[k]);
      }
      for (int i = 1; i < 2 * n - 2; i += 2) {
        cur += d[i] - d[i - 1];
      }
      res = min(res, cur);
    }
  }
  cout << res << '\n';
}
