#include <bits/stdc++.h>
using namespace std;
long long mod = 1;
int n, m, x, y, u, v;
int ar[100005];
int main() {
  int i, j, t, tc = 1, a, b;
  scanf("%d", &n);
  n = n + n;
  for (i = 0; i < n; i++) scanf("%d", &ar[i]);
  int br[1005] = {0};
  int len = 0;
  int mn = INT_MAX;
  int k;
  sort(ar, ar + n);
  int sum = 0;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      for (k = 0; k < n; k++) {
        if (i == k || j == k) continue;
        br[len] = ar[k];
        len++;
      }
      for (k = 0; k < len; k += 2) {
        sum += abs(br[k] - br[k + 1]);
      }
      mn = min(mn, sum);
      br[1005] = {0};
      sum = 0;
      len = 0;
    }
  }
  if (mn == INT_MAX)
    cout << min(0, mn);
  else
    cout << mn << endl;
  return 0;
}
