#include <bits/stdc++.h>
using namespace std;
long long dp[206][206][206];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long r, g, b;
  cin >> r >> g >> b;
  vector<long long> rs(r + 1), gs(g + 1), bs(b + 1);
  for (long long i = 1; i <= r; i++) cin >> rs[i];
  for (long long i = 1; i <= g; i++) cin >> gs[i];
  for (long long i = 1; i <= b; i++) cin >> bs[i];
  sort(rs.begin() + 1, rs.end());
  sort(bs.begin() + 1, bs.end());
  sort(gs.begin() + 1, gs.end());
  reverse(rs.begin() + 1, rs.end());
  reverse(gs.begin() + 1, gs.end());
  reverse(bs.begin() + 1, bs.end());
  long long ans = 0;
  for (long long i = 0; i <= r; i++) {
    for (long long j = 0; j <= g; j++) {
      for (long long k = 0; k <= b; k++) {
        if (i && j)
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j - 1][k] + rs[i] * gs[j]);
        if (i && k)
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j][k - 1] + rs[i] * bs[k]);
        if (k && j)
          dp[i][j][k] = max(dp[i][j][k], dp[i][j - 1][k - 1] + gs[j] * bs[k]);
        ans = max(ans, dp[i][j][k]);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
