#include <bits/stdc++.h>
using namespace std;
int a[100005], n;
int duyet(int k1, int k2) {
  vector<int> q;
  q.clear();
  for (int i = 1; i <= 2 * n; i++)
    if (i != k1 && i != k2) q.push_back(a[i]);
  int ans = 0;
  for (int i = 0; i < q.size(); i += 2) ans += q[i + 1] - q[i];
  return ans;
}
void solve() {
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) cin >> a[i];
  sort(a + 1, a + 2 * n + 1);
  int ans = 1000000007;
  for (int i = 1; i <= 2 * n; i++)
    for (int j = i + 1; j <= 2 * n; j++) ans = min(duyet(i, j), ans);
  cout << ans;
}
int main() { solve(); }
