#include <bits/stdc++.h>
using namespace std;
const int N = 210;
int R[N], G[N], B[N];
int ans = 0;
int f[N][N][N];
int main() {
  int r, g, b;
  scanf("%d%d%d", &r, &g, &b);
  for (int i = 1; i <= r; i++) scanf("%d", &R[i]);
  for (int i = 1; i <= g; i++) scanf("%d", &G[i]);
  for (int i = 1; i <= b; i++) scanf("%d", &B[i]);
  sort(R + 1, R + r + 1);
  sort(G + 1, G + g + 1);
  sort(B + 1, B + b + 1);
  f[1][1][0] = R[1] * G[1];
  f[1][0][1] = R[1] * B[1];
  f[0][1][1] = G[1] * B[1];
  for (int i = 0; i <= r; i++) {
    for (int j = 0; j <= g; j++) {
      for (int k = 0; k <= b; k++) {
        if (i != 0) {
          if (j != 0) {
            f[i][j][k] = max(f[i][j][k], f[i - 1][j - 1][k] + R[i] * G[j]);
          }
        }
        if (i != 0) {
          if (k != 0) {
            f[i][j][k] = max(f[i][j][k], f[i - 1][j][k - 1] + R[i] * B[k]);
          }
        }
        if (j != 0) {
          if (k != 0) {
            f[i][j][k] = max(f[i][j][k], f[i][j - 1][k - 1] + G[j] * B[k]);
          }
        }
        ans = max(ans, f[i][j][k]);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
