#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
long long power(long long n, long long a, long long p) {
  long long res = 1;
  while (n) {
    if (n % 2) {
      res = (res * a) % p;
      n--;
    } else {
      a = (a * a) % p;
      n = n / 2;
    }
  }
  return res;
}
long long binarySearch(long long arr[], long long l, long long r, long long x) {
  long long mid;
  while (l <= r) {
    mid = (l + r) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] < x)
      l = mid + 1;
    else
      r = mid - 1;
  }
  return -1;
}
long long fact(long long n, long long k) {
  long long ans = 1;
  if (k > n - k) {
    k = n - k;
  }
  for (long long i = 1; i <= k; i++) {
    ans *= (n - i + 1);
    ans /= i;
  }
  return ans;
}
long long rc[2001], gc[2001], bc[2001];
long long dp[201][201][201];
long long col(long long r, long long g, long long b) {
  if (r == 0 && g == 0 && b == 0) return 0;
  if (dp[r][g][b] != -1) return dp[r][g][b];
  long long x = rc[r] * gc[g];
  long long y = gc[g] * bc[b];
  long long z = bc[b] * rc[r];
  if (r > 0 && g > 0) x = x + col(r - 1, g - 1, b);
  if (g > 0 && b > 0) y = y + col(r, g - 1, b - 1);
  if (r > 0 && b > 0) z = z + col(r - 1, g, b - 1);
  return dp[r][g][b] = max(x, max(y, z));
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long r, g, b;
  cin >> r >> g >> b;
  memset(dp, -1, sizeof(dp));
  for (long long i = 1; i <= r; i++) {
    cin >> rc[i];
  }
  for (long long i = 1; i <= g; i++) {
    cin >> gc[i];
  }
  for (long long i = 1; i <= b; i++) {
    cin >> bc[i];
  }
  sort(rc + 1, rc + r + 1);
  sort(gc + 1, gc + g + 1);
  sort(bc + 1, bc + b + 1);
  cout << col(r, g, b) << "\n";
}
