#include <bits/stdc++.h>
using namespace std;
int n, p[110], sol = 10000000, t, cur;
int abs1(int x) {
  if (x < 0) return -x;
  return x;
}
void mini(int &a, int b) { a = min(a, b); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < 2 * n; i++) {
    scanf("%d", &p[i]);
  }
  sort(p, p + n + n);
  for (int i = 0; i < n + n; i++) {
    for (int j = i + 1; j < n + n; j++) {
      int tmp = 0;
      cur = 0;
      t = 0;
      for (int k = 0; k < n + n; k++) {
        if (k == i || k == j) continue;
        if (t) {
          t = 0;
          cur -= p[k];
          tmp += abs1(cur);
        } else {
          cur = p[k];
          t = 1;
        }
      }
      mini(sol, tmp);
    }
  }
  printf("%d\n", sol);
  return 0;
}
