#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long mod) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
bool cmp(string a, string b) { return a.length() < b.length(); }
long long dp[206][206][206];
long long solve(vector<long long> &R, vector<long long> &G,
                vector<long long> &B, long long i, long long j, long long k) {
  long long res = 0;
  if (dp[i][j][k] != -1) {
    return dp[i][j][k];
  }
  if (i < R.size() and j < G.size()) {
    long long cur = R[i] * G[j] + solve(R, G, B, i + 1, j + 1, k);
    res = max(res, cur);
  }
  if (i < R.size() and k < B.size()) {
    long long cur = R[i] * B[k] + solve(R, G, B, i + 1, j, k + 1);
    res = max(res, cur);
  }
  if (j < G.size() and k < B.size()) {
    long long cur = G[j] * B[k] + solve(R, G, B, i, j + 1, k + 1);
    res = max(res, cur);
  }
  dp[i][j][k] = res;
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long r;
  cin >> r;
  long long g;
  cin >> g;
  long long b;
  cin >> b;
  memset(dp, -1, sizeof dp);
  vector<long long> R(r);
  for (long long i = 0; i < r; i++) {
    cin >> R[i];
  }
  vector<long long> G(g);
  for (long long i = 0; i < g; i++) {
    cin >> G[i];
  }
  vector<long long> B(b);
  for (long long i = 0; i < b; i++) {
    cin >> B[i];
  }
  sort(R.begin(), R.end(), greater<long long>());
  sort(G.begin(), G.end(), greater<long long>());
  sort(B.begin(), B.end(), greater<long long>());
  long long res = solve(R, G, B, 0, 0, 0);
  cout << res << '\n';
  return 0;
}
