#include <bits/stdc++.h>
using namespace std;
int a[300], b[300];
int get(int n) {
  int s = 0;
  for (int i = 0; i < n; i += 2) {
    s += (a[i + 1] - a[i]);
  }
  return s;
}
int out(int x, int y, int n) {
  int t = 0;
  for (int i = 0; i < 2 * n; i++) {
    if (i == x || i == y) continue;
    a[t++] = b[i];
  }
  return get(2 * n - 2);
}
int main() {
  int i, n, j, k, l, r;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < 2 * n; i++) scanf("%d", &b[i]);
    sort(b, b + 2 * n);
    int ma = 1e9;
    for (i = 0; i < 2 * n; i++) {
      for (j = i + 1; j < 2 * n; j++) ma = min(out(i, j, n), ma);
    }
    printf("%d\n", ma);
  }
  return 0;
}
