#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int par[1];
int find(int x) { return x == par[x] ? x : par[x] = find(par[x]); }
void join(int x, int y) { par[find(x)] = y; }
long long mod_expo(long long a, long long b, long long mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b, long long& x, long long& y) {
  if (!a) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
const int N = 100005;
int a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, i, j, k, p, l;
  int ans, sum;
  cin >> n;
  for (i = 0; i < 2 * n; ++i) {
    cin >> a[i];
  }
  sort(a, a + 2 * n);
  ans = INT_MAX;
  for (i = 0; i < 2 * n; ++i) {
    for (j = i + 1; j < 2 * n; ++j) {
      sum = 0;
      for (k = l = 0; k < 2 * n; ++k) {
        if (k == i || k == j) continue;
        if (l % 2) sum += a[k] - a[p];
        p = k;
        ++l;
      }
      ans = min(ans, sum);
    }
  }
  cout << ans << "\n";
  return 0;
}
