#include <bits/stdc++.h>
using namespace std;
int64_t n, i, j, k, l, sum = 0, flag = 0, ans = 0;
int64_t dp[201][201][201];
int64_t R, B, G;
vector<int64_t> r, b, g;
int64_t f(int64_t i, int64_t j, int64_t k) {
  if (((i < R) + (j < B) + (k < G)) < 2) return 0;
  if (dp[i][j][k] != -1) return dp[i][j][k];
  int64_t ans = 0;
  if ((i < R) && (j < B)) ans = max(ans, r[i] * b[j] + f(i + 1, j + 1, k));
  if ((i < R) && (k < G)) ans = max(ans, r[i] * g[k] + f(i + 1, j, k + 1));
  if ((j < B) && (k < G)) ans = max(ans, b[j] * g[k] + f(i, j + 1, k + 1));
  return dp[i][j][k] = ans;
}
void solve() {
  cin >> R >> B >> G;
  for (int64_t i = 0; i < R; i++) cin >> k, r.push_back(k);
  for (int64_t i = 0; i < B; i++) cin >> k, b.push_back(k);
  for (int64_t i = 0; i < G; i++) cin >> k, g.push_back(k);
  sort((r).begin(), (r).end());
  reverse((r).begin(), (r).end());
  sort((b).begin(), (b).end());
  reverse((b).begin(), (b).end());
  sort((g).begin(), (g).end());
  reverse((g).begin(), (g).end());
  memset(dp, -1, sizeof dp);
  cout << f(0, 0, 0) << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int64_t test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
