#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using pli = pair<long long, int>;
using pll = pair<long long, long long>;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;
const int INF = 0x3f3f3f3f;
const int maxn = 2100;
int r[maxn], g[maxn], b[maxn];
int dp[210][210][210];
void run_case() {
  int R, G, B;
  cin >> R >> G >> B;
  for (int i = 1; i <= R; i++) {
    cin >> r[i];
  }
  for (int i = 1; i <= G; i++) {
    cin >> g[i];
  }
  for (int i = 1; i <= B; i++) {
    cin >> b[i];
  }
  sort(r + 1, r + 1 + R);
  sort(g + 1, g + 1 + G);
  sort(b + 1, b + 1 + B);
  for (int i = 0; i <= R; i++) {
    for (int j = 0; j <= G; j++) {
      for (int k = 0; k <= B; k++) {
        if (i > 0 && j > 0)
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j - 1][k] + r[i] * g[j]);
        if (j > 0 && k > 0)
          dp[i][j][k] = max(dp[i][j][k], dp[i][j - 1][k - 1] + g[j] * b[k]);
        if (i > 0 && k > 0)
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j][k - 1] + r[i] * b[k]);
      }
    }
  }
  cout << dp[R][G][B] << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << setiosflags(ios::fixed) << setprecision(12);
  run_case();
  cout.flush();
  return 0;
}
