#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n < 2) return false;
  for (long long x = 2; x * x <= n; x++) {
    if (n % x == 0) return false;
  }
  return true;
}
bool isPerfectSquare(long double x) {
  long double sr = sqrt(x);
  return ((sr - floor(sr)) == 0);
}
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int dp[201][201][201];
int main() {
  int R, G, B;
  cin >> R >> G >> B;
  int r[R], g[G], b[B];
  for (int i = 0; i < R; i++) cin >> r[i];
  for (int i = 0; i < G; i++) cin >> g[i];
  for (int i = 0; i < B; i++) cin >> b[i];
  sort(r, r + R);
  sort(g, g + G);
  sort(b, b + B);
  for (int i = 0; i <= R; i++)
    for (int j = 0; j <= G; j++)
      for (int k = 0; k <= B; k++) {
        if (i && j)
          dp[i][j][k] =
              max(dp[i][j][k], dp[i - 1][j - 1][k] + r[i - 1] * g[j - 1]);
        if (i && k)
          dp[i][j][k] =
              max(dp[i][j][k], dp[i - 1][j][k - 1] + r[i - 1] * b[k - 1]);
        if (j && k)
          dp[i][j][k] =
              max(dp[i][j][k], dp[i][j - 1][k - 1] + g[j - 1] * b[k - 1]);
      }
  cout << dp[R][G][B] << "\n";
  ;
}
