#include <bits/stdc++.h>
using namespace std;
int A, B, C;
int a[201], b[201], c[201];
long long f[201][201][201];
bool cmp(int i, int j) { return i > j; }
int main() {
  int x, y, z;
  scanf("%d%d%d", &A, &B, &C);
  for (int i = 1; i <= A; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= B; ++i) scanf("%d", &b[i]);
  for (int i = 1; i <= C; ++i) scanf("%d", &c[i]);
  sort(a + 1, a + 1 + A, cmp);
  sort(b + 1, b + 1 + B, cmp);
  sort(c + 1, c + 1 + C, cmp);
  f[0][0][0] = 0;
  long long ans = 0;
  for (int i = 0; i <= A; ++i) {
    for (int j = 0; j <= B; ++j) {
      for (int k = 0; k <= C; ++k) {
        if (i && j) {
          f[i][j][k] = max(f[i][j][k], f[i - 1][j - 1][k] + 1ll * a[i] * b[j]);
        }
        if (i && k) {
          f[i][j][k] = max(f[i][j][k], f[i - 1][j][k - 1] + 1ll * a[i] * c[k]);
        }
        if (j && k) {
          f[i][j][k] = max(f[i][j][k], f[i][j - 1][k - 1] + 1ll * b[j] * c[k]);
        }
        ans = max(ans, f[i][j][k]);
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
