#include <bits/stdc++.h>
using namespace std;
inline void read_string_to_vector(vector<string> &vec) {
  string str;
  getline(cin, str);
  vec.push_back(str);
}
template <typename T>
inline void read_digit_to_vector(vector<T> &vec) {
  T t;
  cin >> t;
  vec.push_back(t);
}
long long n;
long long a[200001], b[200001];
long long answ = 1000000000000000001LL;
long long test(long long x, long long y) {
  long long ta = 0;
  long long i = 0;
  for (register long long j = 0; j < n; ++j)
    if (j != x && j != y) b[i++] = a[j];
  long long j = 0;
  while (j < i) {
    ta += b[j + 1] - b[j];
    j += 2;
  }
  return ta;
}
int main() {
  scanf("%lld", &n);
  n *= 2;
  for (register long long i = 0; i < n; ++i) scanf("%lld", a + i);
  sort(a, a + n);
  for (register long long i = 0; i < n; ++i)
    for (register long long j = i + 1; j < n; ++j) answ = min(answ, test(i, j));
  printf("%lld\n", answ);
  return 0;
}
