#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using tpl = tuple<int, int, int>;
using pcc = pair<char, char>;
const ll inf = 1e18 + 100;
const ll mod = 1e9 + 7;
int dr[] = {-1, 0, 1, 0};
int dc[] = {0, 1, 0, -1};
int kr[] = {-1, 1, -2, -2, -1, 1, 2, 2};
int kc[] = {-2, -2, -1, 1, 2, 2, -1, 1};
int dgr[] = {-1, -1, 1, 1};
int dgc[] = {1, -1, -1, 1};
const int N = 2e2 + 5;
int r, g, b, kase = 1;
ll red[N], grn[N], blu[N];
ll dp[N][N][N];
ll fun(int i, int j, int k) {
  if (((!(r - i)) + (!(g - j)) + (!(b - k))) >= 2) return 0;
  ll &mami = dp[i][j][k];
  if (mami != -1) return mami;
  ll ans = 0;
  if (i < r && j < g) ans = max(ans, red[i] * grn[j] + fun(i + 1, j + 1, k));
  if (i < r && k < b) ans = max(ans, red[i] * blu[k] + fun(i + 1, j, k + 1));
  if (j < g && k < b) ans = max(ans, grn[j] * blu[k] + fun(i, j + 1, k + 1));
  return mami = ans;
}
void solve() {
  cin >> r >> g >> b;
  for (int i = 0; i < r; i++) cin >> red[i];
  for (int i = 0; i < g; i++) cin >> grn[i];
  for (int i = 0; i < b; i++) cin >> blu[i];
  sort(red, red + r);
  reverse(red, red + r);
  sort(grn, grn + g);
  reverse(grn, grn + g);
  sort(blu, blu + b);
  reverse(blu, blu + b);
  memset(dp, -1, sizeof dp);
  printf("%lld\n", fun(0, 0, 0));
  kase++;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
