#include <bits/stdc++.h>
using namespace std;
int n, a[12345];
int calc(int x, int y) {
  int ret = 0;
  vector<int> v;
  for (int i = 0; i < 2 * n; ++i) {
    if (i != x && i != y) v.push_back(a[i]);
  }
  for (int i = 0; i < v.size(); i += 2) ret += abs(v[i] - v[i + 1]);
  return ret;
}
int main() {
  cin >> n;
  int mn = 1e9, i;
  for (i = 0; i < 2 * n; i++) cin >> a[i];
  sort(a, a + 2 * n);
  for (int i = 0; i < n * 2; i++) {
    for (int j = i + 1; j < n * 2; j++) {
      mn = min(mn, calc(i, j));
    }
  }
  cout << mn;
}
