#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
long long r, g, b;
long long dp[201][201][201];
std::vector<long long> R(201);
std::vector<long long> G(201);
std::vector<long long> B(201);
long long solve(long long i, long long j, long long k) {
  if ((i >= r && j >= g) || (j >= g && k >= b) || (i >= r && k >= b)) return 0;
  if (dp[i][j][k] != -1) return dp[i][j][k];
  if (i < r && j < g) {
    dp[i][j][k] = max(dp[i][j][k], solve(i + 1, j + 1, k) + R[i] * G[j]);
  }
  if (j < g && k < b) {
    dp[i][j][k] = max(dp[i][j][k], solve(i, j + 1, k + 1) + G[j] * B[k]);
  }
  if (i < r && k < b) {
    dp[i][j][k] = max(dp[i][j][k], solve(i + 1, j, k + 1) + R[i] * B[k]);
  }
  return dp[i][j][k];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> r >> g >> b;
  for (long long i = 0; i < r; i++) cin >> R[i];
  for (long long i = 0; i < g; i++) cin >> G[i];
  for (long long i = 0; i < b; i++) cin >> B[i];
  memset(dp, -1, sizeof(dp));
  sort(R.begin(), R.end(), greater<int>());
  sort(G.begin(), G.end(), greater<int>());
  sort(B.begin(), B.end(), greater<int>());
  cout << solve(0, 0, 0) << "\n";
}
