#include <bits/stdc++.h>
using namespace std;
int64_t r[205], g[205], b[205];
int64_t dp[205][205][205];
int64_t ct = 0;
int64_t solve(int r1, int g1, int b1) {
  if (r1 * g1 + g1 * b1 + r1 * b1 == 0) return 0;
  if (dp[r1][g1][b1] != -1) return dp[r1][g1][b1];
  ct++;
  if (r1 == 0) {
    return dp[r1][g1][b1] = g[g1] * b[b1] + solve(r1, g1 - 1, b1 - 1);
  }
  if (g1 == 0) {
    return dp[r1][g1][b1] = r[r1] * b[b1] + solve(r1 - 1, g1, b1 - 1);
  }
  if (b1 == 0) {
    return dp[r1][g1][b1] = g[g1] * r[r1] + solve(r1 - 1, g1 - 1, b1);
  }
  return dp[r1][g1][b1] = max(g[g1] * b[b1] + solve(r1, g1 - 1, b1 - 1),
                              max(r[r1] * b[b1] + solve(r1 - 1, g1, b1 - 1),
                                  g[g1] * r[r1] + solve(r1 - 1, g1 - 1, b1)));
}
int64_t fnc(int r1, int g1, int b1) {
  memset(dp, -1, sizeof(dp));
  sort(r + 1, r + r1 + 1);
  sort(g + 1, g + g1 + 1);
  sort(b + 1, b + b1 + 1);
  return solve(r1, g1, b1);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    int r1, g1, b1;
    cin >> r1 >> g1 >> b1;
    for (int i = 1; i <= r1; i++) cin >> r[i];
    for (int i = 1; i <= g1; i++) cin >> g[i];
    for (int i = 1; i <= b1; i++) cin >> b[i];
    cout << fnc(r1, g1, b1) << endl;
  }
  return 0;
}
