#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
long long lowbit(long long x) { return x & (-x); }
long long prime(long long x) {
  if (x <= 1) return false;
  for (int i = 2; i <= int(sqrt(x)); i++) {
    if (x % i == 0) return false;
  }
  return true;
}
bool cmp(long long a, long long b) { return a > b; }
long long gcd(long long a, long long b) {
  long long r;
  while (b > 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
inline int readint() {
  int f = 1, x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
inline long long readll() {
  long long f = 1, x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
void fl(string name) {
  freopen((name + ".in").c_str(), "r", stdin);
  freopen((name + ".out").c_str(), "w", stdout);
}
const int dx[8] = {-1, 1, 0, 0, -1, 1, -1, 1},
          dy[8] = {0, 0, -1, 1, -1, -1, 1, 1};
long long f[210][210][210];
int main() {
  long long x, y, z;
  cin >> x >> y >> z;
  long long a[x + 1], b[y + 1], c[z + 1];
  for (int i = 1; i <= x; i++) cin >> a[i];
  for (int i = 1; i <= y; i++) cin >> b[i];
  for (int i = 1; i <= z; i++) cin >> c[i];
  sort(a + 1, a + x + 1, cmp);
  sort(b + 1, b + y + 1, cmp);
  sort(c + 1, c + z + 1, cmp);
  long long res = 0;
  memset(f, -2, sizeof(f));
  f[0][0][0] = 0;
  for (int i = 0; i <= x; i++) {
    for (int j = 0; j <= y; j++) {
      for (int k = 0; k <= z; k++) {
        if (i == 0 && j == 0 && k == 0)
          continue;
        else {
          if (i >= 1 && j >= 1 && f[i - 1][j - 1][k] != -2)
            f[i][j][k] = max(f[i][j][k], f[i - 1][j - 1][k] + a[i] * b[j]);
          if (k >= 1 && j >= 1 && f[i][j - 1][k - 1] != -2)
            f[i][j][k] = max(f[i][j][k], f[i][j - 1][k - 1] + c[k] * b[j]);
          if (i >= 1 && k >= 1 && f[i - 1][j][k - 1] != -2)
            f[i][j][k] = max(f[i][j][k], f[i - 1][j][k - 1] + a[i] * c[k]);
          res = max(res, f[i][j][k]);
        }
      }
    }
  }
  cout << res << '\n';
  return 0;
}
