#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n, n += n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) scanf("%d", &v[i]);
  sort(v.begin(), v.end());
  int mn = 1e9;
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j) {
      int sum = 0, k1 = 0, k2;
      while (k1 < n) {
        while (k1 == i || k1 == j) ++k1;
        if (k1 >= n) break;
        k2 = k1 + 1;
        while (k2 == i || k2 == j) ++k2;
        sum += v[k2] - v[k1];
        k1 = k2 + 1;
      }
      mn = min(mn, sum);
    }
  cout << mn;
  return 0;
}
