#include <bits/stdc++.h>
using namespace std;
int solve(vector<int> a) {
  int res = 0;
  for (int i = 0; i + 1 < (int)a.size(); i += 2) {
    res += a[i + 1] - a[i];
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  n += n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  int res = 100000007;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      vector<int> b;
      for (int k = 0; k < n; k++) {
        if (i != k && j != k) b.push_back(a[k]);
      }
      res = min(res, solve(b));
    }
  }
  cout << res << endl;
}
