#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll inf = 1e18;
const int N = 2 * 1e5 + 10;
int r, g, b;
int a[205], bb[205], c[205];
ll dp[205][205][205];
ll go(ll xx, ll yy, ll zz) {
  if (dp[xx][yy][zz] != -1) return dp[xx][yy][zz];
  ll x = 0, y = 0, z = 0;
  if (xx < r && yy < g) x = a[xx] * bb[yy] + go(xx + 1, yy + 1, zz);
  if (xx < r && zz < b) y = a[xx] * c[zz] + go(xx + 1, yy, zz + 1);
  if (yy < g && zz < b) z = bb[yy] * c[zz] + go(xx, yy + 1, zz + 1);
  return dp[xx][yy][zz] = max({x, y, z});
}
void solve() {
  cin >> r >> g >> b;
  for (int i = 0; i < r; i++) cin >> a[i];
  for (int i = 0; i < g; i++) cin >> bb[i];
  for (int i = 0; i < b; i++) cin >> c[i];
  sort(a, a + r, greater<int>());
  sort(bb, bb + g, greater<int>());
  sort(c, c + b, greater<int>());
  memset(dp, -1, sizeof(dp));
  cout << go(0, 0, 0) << "\n";
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ll t = 1;
  while (t--) {
    solve();
  }
}
