#include <bits/stdc++.h>
using namespace std;
void doRoutine() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
const long long int INF = 1e12;
signed main() {
  doRoutine();
  long long int n;
  cin >> n;
  vector<long long int> a(179);
  for (long long int i = 0; i < 2 * n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.begin() + 2 * n);
  long long int ans = INF;
  for (long long int i = 0; i < 2 * n - 1; i++) {
    for (long long int j = i + 1; j < 2 * n; j++) {
      long long int cur = 0, k = 0;
      while (k < 2 * n - 1) {
        for (; k == i || k == j; k++)
          ;
        long long int l = k + 1;
        for (; l == i || l == j; l++)
          ;
        cur += a[l] - a[k];
        k = l + 1;
      }
      ans = min(ans, cur);
    }
  }
  cout << ans << '\n';
  return 0;
}
