#include <bits/stdc++.h>
using namespace std;
const long long maxR = 200;
const long long maxG = 200;
const long long maxB = 200;
long long dp[maxR + 1][maxG + 1][maxB + 1];
long long computed[maxR + 1][maxG + 1][maxB + 1];
long long r[maxR + 1], g[maxG + 1], b[maxB + 1];
long long get(long long ir, long long ig, long long ib) {
  if (computed[ir][ig][ib]) {
    return dp[ir][ig][ib];
  }
  long long ans = 0;
  if (ir > 0) {
    if (ig > 0) {
      ans = max(ans, r[ir] * g[ig] + get(ir - 1, ig - 1, ib));
      if (ib > 0) {
        ans = max(ans, r[ir] * b[ib] + get(ir - 1, ig, ib - 1));
        ans = max(ans, g[ig] * b[ib] + get(ir, ig - 1, ib - 1));
      }
    } else {
      if (ib > 0) {
        ans = max(ans, r[ir] * b[ib] + get(ir - 1, ig, ib - 1));
      }
    }
  } else {
    if (ig > 0) {
      if (ib > 0) {
        ans = max(ans, g[ig] * b[ib] + get(ir, ig - 1, ib - 1));
      }
    }
  }
  computed[ir][ig][ib] = true;
  dp[ir][ig][ib] = ans;
  return ans;
}
int main() {
  long long R, G, B;
  cin >> R >> G >> B;
  for (long long i = 1; i <= R; i++) {
    cin >> r[i];
  }
  sort(r, r + R + 1);
  for (long long i = 1; i <= G; i++) {
    cin >> g[i];
  }
  sort(g, g + G + 1);
  for (long long i = 1; i <= B; i++) {
    cin >> b[i];
  }
  sort(b, b + B + 1);
  cout << get(R, G, B) << endl;
}
