#include <bits/stdc++.h>
using namespace std;
int n, a[100000], MINIMUM = 1000000, x, y;
int main() {
  cin >> n;
  n *= 2;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < i; j++) {
      x = y = 0;
      for (int k = 0; k < n; k++)
        if (k != i && k != j) {
          if (y % 2)
            x += a[k];
          else
            x -= a[k];
          y++;
        }
      MINIMUM = min(MINIMUM, x);
    }
  cout << MINIMUM << endl;
  return 0;
}
