#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, answer = INT_MAX;
  cin >> n;
  n = n * 2;
  vector<int> v;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      int totalsum = 0;
      vector<int> p;
      for (int k = 0; k < n; ++k) {
        if (i != k && j != k) {
          p.push_back(v[k]);
        }
      }
      for (int c = 1; c < n - 1;) {
        totalsum = totalsum + (p[c] - p[c - 1]);
        c = c + 2;
      }
      answer = min(answer, totalsum);
    }
  }
  cout << answer;
  return 0;
}
