#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1.0) * 4;
const long long int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  n = 2 * n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int ans = INT_MAX;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (j == i) continue;
      int count = 0;
      int temp[2] = {0};
      int tot = 0;
      for (int k = 0; k < n; k++) {
        if (arr[k] == arr[i] || arr[k] == arr[j]) continue;
        temp[count++] = arr[k];
        if (count == 2) {
          tot += temp[1] - temp[0];
          count = 0;
        }
      }
      ans = min(ans, tot);
    }
  cout << ans << endl;
  return 0;
}
