#include <bits/stdc++.h>
using namespace std;
const int maxn = 110, inf = 100000000;
int nums[maxn], n;
int solve(int x, int y) {
  int sum = 0, cnt = 0, p[2];
  for (int i = 1; i <= 2 * n; i++) {
    if (i == x || i == y) continue;
    p[cnt++] = nums[i];
    if (cnt == 2) {
      sum += p[1] - p[0];
      cnt = 0;
    }
  }
  return sum;
}
int main() {
  int ans = inf;
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) cin >> nums[i];
  sort(nums + 1, nums + 1 + 2 * n);
  for (int i = 1; i <= 2 * n; i++)
    for (int j = i + 1; j <= 2 * n; j++) ans = min(ans, solve(i, j));
  cout << ans << endl;
  return 0;
}
