#include <bits/stdc++.h>
using namespace std;
const long long sz = 205;
long long a[sz], b[sz], c[sz], dp[sz][sz][sz];
long long solve(long long ida, long long idb, long long idc) {
  if ((ida > 0) + (idb > 0) + (idc > 0) < 2) return 0;
  long long &ret = dp[ida][idb][idc];
  if (ret != -1) return ret;
  ret = 0;
  if (ida > 0) {
    if (idb > 0) ret = max(ret, a[ida] * b[idb] + solve(ida - 1, idb - 1, idc));
    if (idc > 0) ret = max(ret, a[ida] * c[idc] + solve(ida - 1, idb, idc - 1));
  }
  if (idb > 0 && idc > 0)
    ret = max(ret, b[idb] * c[idc] + solve(ida, idb - 1, idc - 1));
  return ret;
}
int main() {
  long long r, g, bl;
  cin >> r >> g >> bl;
  for (long long i = 1; i <= r; ++i) scanf("%lld", &a[i]);
  for (long long i = 1; i <= g; ++i) scanf("%lld", &b[i]);
  for (long long i = 1; i <= bl; ++i) scanf("%lld", &c[i]);
  sort(a + 1, a + r + 1);
  sort(b + 1, b + g + 1);
  sort(c + 1, c + bl + 1);
  long long ida = r, idb = g, idc = bl;
  memset(dp, -1, sizeof(dp));
  long long ans = solve(ida, idb, idc);
  printf("%lld\n", ans);
  return 0;
}
