#include <bits/stdc++.h>
using namespace std;
long long red[210];
long long green[210];
long long blue[210];
long long dp[210][210][210];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int r, g, b;
  cin >> r >> g >> b;
  for (int i = 1; i <= r; i++) cin >> red[i];
  for (int i = 1; i <= g; i++) cin >> green[i];
  for (int i = 1; i <= b; i++) cin >> blue[i];
  sort(red, red + r + 1);
  sort(green, green + g + 1);
  sort(blue, blue + b + 1);
  for (int i = 0; i <= r; i++) {
    for (int j = 0; j <= g; j++) {
      for (int k = 0; k <= b; k++) {
        if (i > 0 && j > 0)
          dp[i][j][k] =
              max(dp[i][j][k], dp[i - 1][j - 1][k] + red[i] * green[j]);
        if (j > 0 && k > 0)
          dp[i][j][k] =
              max(dp[i][j][k], dp[i][j - 1][k - 1] + green[j] * blue[k]);
        if (i > 0 && k > 0)
          dp[i][j][k] =
              max(dp[i][j][k], dp[i - 1][j][k - 1] + red[i] * blue[k]);
      }
    }
  }
  cout << dp[r][g][b] << '\n';
}
