#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-14;
const long long maxn = 100500;
const long long mod = 1e9 + 7;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> v(2 * n);
  for (auto &x : v) cin >> x;
  sort((v).begin(), (v).end());
  long long ans = 1e9;
  for (long long i = 0; i < (long long)(v).size() - 1; ++i)
    for (long long j = i + 1; j < (long long)(v).size(); ++j) {
      vector<long long> a;
      for (long long k = 0; k < (long long)(v).size(); ++k)
        if (k != i && k != j) a.push_back(v[k]);
      long long ad = 0;
      for (long long k = 0; k < (long long)(a).size() - 1; k += 2)
        ad += a[k + 1] - a[k];
      ans = min(ans, ad);
    }
  cout << ans << '\n';
  return 0;
}
