#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<int> weight;
  cin >> n;
  float total = 0;
  for (int i = 0; i < n * 2; i++) {
    int input;
    cin >> input;
    total += input;
    weight.push_back(input);
  }
  sort(weight.begin(), weight.end());
  int minimum = 100000000;
  int total1;
  for (int i = 0; i < n * 2; i++) {
    for (int j = i + 1; j < n * 2; j++) {
      total1 = 0;
      vector<int> a;
      for (int k1 = 0; k1 < n * 2; k1++) {
        if (k1 != i && k1 != j) {
          a.push_back(weight[k1]);
        }
      }
      for (int k1 = 0; k1 < n * 2 - 2; k1 += 2) {
        total1 += a[k1 + 1] - a[k1];
      }
      minimum = min(total1, minimum);
      a.clear();
    }
  }
  cout << minimum;
}
