#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') f = ch == '-' ? -1 : 1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
  return x * f;
}
const int maxn = 205;
int tot;
int R, G, B;
int r[maxn];
int g[maxn];
int b[maxn];
int f[maxn][maxn][maxn];
struct Stick {
  int v, c;
} a[maxn << 3];
inline bool cmp(int u, int v) { return u > v; }
int main() {
  R = read(), G = read(), B = read();
  for (int i = (1); i <= (R); i++) r[i] = read();
  for (int i = (1); i <= (G); i++) g[i] = read();
  for (int i = (1); i <= (B); i++) b[i] = read();
  sort(r + 1, r + R + 1, cmp), sort(g + 1, g + G + 1, cmp),
      sort(b + 1, b + B + 1, cmp);
  f[1][1][0] = r[1] * g[1];
  f[1][0][1] = r[1] * b[1];
  f[0][1][1] = g[1] * b[1];
  int ans = 0;
  for (int i = (0); i <= (R); i++)
    for (int j = (0); j <= (G); j++)
      for (int k = (0); k <= (B); k++) {
        if (i && j)
          f[i][j][k] = max(f[i][j][k], f[i - 1][j - 1][k] + r[i] * g[j]);
        if (i && k)
          f[i][j][k] = max(f[i][j][k], f[i - 1][j][k - 1] + r[i] * b[k]);
        if (j && k)
          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;
  return 0;
}
