#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  n *= 2;
  vector<int> v(n);
  for (auto& i : v) {
    cin >> i;
  }
  auto newAns = [&](vector<int> a) {
    int res = 0;
    for (int i = 1; i < (int)a.size(); i += 2) {
      res += a[i] - a[i - 1];
    }
    return res;
  };
  sort(v.begin(), v.end());
  int ans = 1234567;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      vector<int> cur;
      for (int k = 0; k < n; k++) {
        if (k == i || k == j) continue;
        cur.push_back(v[k]);
      }
      ans = min(ans, newAns(cur));
    }
  }
  cout << ans << "\n";
  return 0;
}
