#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::vector<int> w(2 * n);
  for (int i = 0; i < 2 * n; ++i) {
    std::cin >> w[i];
  }
  std::sort(w.begin(), w.end());
  int ans = 100000;
  for (int i = 0; i < 2 * n; ++i) {
    for (int j = i + 1; j < 2 * n; ++j) {
      int sign = -1;
      int cur = 0;
      for (int k = 0; k < 2 * n; ++k) {
        if (k == i || k == j) continue;
        cur += sign * w[k];
        sign *= -1;
      }
      ans = std::min(ans, cur);
    }
  }
  std::cout << ans;
}
