#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000;
int a[MAXN];
int n;
int main() {
  scanf("%d", &n);
  n *= 2;
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int ans = 1e9;
  for (int j = 1; j <= n; ++j)
    for (int k = j + 1; k <= n; ++k) {
      int t = 0;
      for (int i = 1; i < n;) {
        while (i == j || i == k) ++i;
        int p = i + 1;
        while (p == j || p == k) ++p;
        t += a[p] - a[i];
        i = p + 1;
      }
      ans = min(t, ans);
    }
  printf("%d", ans);
  return 0;
}
