#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long a = 0, f = 1;
  char ch;
  while ((ch = getchar()) < '0' || ch > '9') {
    if (ch == '-') {
      f = -1;
      ch = getchar();
      break;
    }
  }
  while (ch >= '0' && ch <= '9') {
    a = (a << 3) + (a << 1) + ch - '0';
    ch = getchar();
  }
  return a * f;
}
template <typename Tp>
void print(Tp a) {
  if (a < 0) {
    a = -a;
    putchar('-');
  }
  if (a >= 10) {
    print(a / 10);
  }
  putchar(a % 10 + '0');
}
long long n, m, l[3], len[3][207], dp[207][207][207];
int main() {
  for (int i = 0; i < 3; i++) l[i] = read();
  for (int i = 0; i < 3; i++)
    for (int j = 1; j <= l[i]; j++) len[i][j] = read();
  for (int i = 0; i < 3; i++)
    sort(len[i] + 1, len[i] + l[i] + 1, greater<int>());
  dp[1][1][0] = len[0][1] * len[1][1];
  dp[1][0][1] = len[0][1] * len[2][1];
  dp[0][1][1] = len[1][1] * len[2][1];
  for (int i = l[0]; i >= 0; i--) {
    for (int j = l[1]; j >= 0; j--) {
      for (int k = l[2]; k >= 0; k--) {
        dp[i][j][k] =
            max(dp[i + 1][j + 1][k] + len[0][i + 1] * len[1][j + 1],
                max(dp[i + 1][j][k + 1] + len[0][i + 1] * len[2][k + 1],
                    dp[i][j + 1][k + 1] + len[1][j + 1] * len[2][k + 1]));
      }
    }
  }
  print(dp[0][0][0]);
  return 0;
}
