#include <bits/stdc++.h>
using namespace std;
long long dp[205][205][205];
long long red[205], green[205], blue[205];
long long ColRect(long long r, long long g, long long b) {
  if ((r == 0 && g == 0) || (g == 0 && b == 0) || (r == 0 && b == 0)) {
    dp[r][g][b] = 0;
    return 0;
  }
  if (dp[r][g][b] != -1) {
    return dp[r][g][b];
  }
  long long ans = 0;
  if (r > 0 && g > 0) {
    dp[r][g][b] = max(dp[r][g][b],
                      (red[r - 1] * green[g - 1]) + ColRect(r - 1, g - 1, b));
  }
  if (g > 0 && b > 0) {
    dp[r][g][b] = max(dp[r][g][b],
                      (blue[b - 1] * green[g - 1]) + ColRect(r, g - 1, b - 1));
  }
  if (r > 0 && b > 0) {
    dp[r][g][b] =
        max(dp[r][g][b], (red[r - 1] * blue[b - 1]) + ColRect(r - 1, g, b - 1));
  }
  ans = max(ans, dp[r][g][b]);
  return ans;
}
int32_t main() {
  long long r, g, b;
  cin >> r >> g >> b;
  for (long long i = 0; i < r; i++) {
    cin >> red[i];
  }
  for (long long i = 0; i < g; i++) {
    cin >> green[i];
  }
  for (long long i = 0; i < b; i++) {
    cin >> blue[i];
  }
  sort(red, red + r);
  sort(green, green + g);
  sort(blue, blue + b);
  for (long long i = 0; i <= r; i++) {
    for (long long j = 0; j <= g; j++) {
      for (long long k = 0; k <= b; k++) {
        dp[i][j][k] = -1;
      }
    }
  }
  long long result = ColRect(r, g, b);
  cout << result << endl;
  return 0;
}
