#include <bits/stdc++.h>
using namespace std;
const int NMAX = 200;
struct state {
  int a, b, c;
};
int R, G, B;
int r[NMAX + 2], g[NMAX + 2], b[NMAX + 2];
bool seen[NMAX + 2][NMAX + 2][NMAX + 2];
long long dp[NMAX + 2][NMAX + 2][NMAX + 2];
long long maxAns;
int main() {
  cin >> R >> G >> B;
  for (int i = 1; i <= R; i++) cin >> r[i];
  sort(r + 1, r + R + 1, greater<int>());
  for (int i = 1; i <= G; i++) cin >> g[i];
  sort(g + 1, g + G + 1, greater<int>());
  for (int i = 1; i <= B; i++) cin >> b[i];
  sort(b + 1, b + B + 1, greater<int>());
  queue<state> Q;
  Q.push({0, 0, 0});
  while (!Q.empty()) {
    state curr = Q.front();
    Q.pop();
    int i = curr.a, j = curr.b, k = curr.c;
    maxAns = max(maxAns, dp[i][j][k]);
    if (seen[i][j][k]) continue;
    seen[i][j][k] = 1;
    if (i == R && j == G) continue;
    if (i == R && k == B) continue;
    if (j == G && k == B) continue;
    if (i + 1 <= R && j + 1 <= G) {
      dp[i + 1][j + 1][k] =
          max(dp[i + 1][j + 1][k], dp[i][j][k] + 1LL * r[i + 1] * g[j + 1]);
      Q.push({i + 1, j + 1, k});
    }
    if (i + 1 <= R && k + 1 <= B) {
      dp[i + 1][j][k + 1] =
          max(dp[i + 1][j][k + 1], dp[i][j][k] + 1LL * r[i + 1] * b[k + 1]);
      Q.push({i + 1, j, k + 1});
    }
    if (j + 1 <= G && k + 1 <= B) {
      dp[i][j + 1][k + 1] =
          max(dp[i][j + 1][k + 1], dp[i][j][k] + 1LL * g[j + 1] * b[k + 1]);
      Q.push({i, j + 1, k + 1});
    }
  }
  cout << maxAns << '\n';
  return 0;
}
