#include <bits/stdc++.h>
using namespace std;
int dp[205][205][205];
void solve() {
  int r, g, b;
  cin >> r >> g >> b;
  vector<int> R(r), G(g), B(b);
  for (int i = 0; i < r; i++) cin >> R[i];
  for (int i = 0; i < g; i++) cin >> G[i];
  for (int i = 0; i < b; i++) cin >> B[i];
  sort(R.begin(), R.end(), greater<int>());
  sort(G.begin(), G.end(), greater<int>());
  sort(B.begin(), B.end(), greater<int>());
  int ans;
  for (int i = 0; i <= r; i++) {
    for (int j = 0; j <= g; j++) {
      for (int k = 0; k <= b; k++) {
        int temp1, temp2, temp3;
        if ((i == 0 && j == 0) || (i == 0 && k == 0) || (j == 0 && k == 0) ||
            (i == 0 && j == 0 && k == 0)) {
          temp1 = 0;
          temp2 = 0;
          temp3 = 0;
        } else if (i == 0) {
          temp1 = dp[i][j - 1][k - 1] + G[j - 1] * B[k - 1];
          temp2 = 0;
          temp3 = 0;
        } else if (j == 0) {
          temp1 = 0;
          temp2 = dp[i - 1][j][k - 1] + R[i - 1] * B[k - 1];
          temp3 = 0;
        } else if (k == 0) {
          temp1 = 0;
          temp2 = 0;
          temp3 = dp[i - 1][j - 1][k] + R[i - 1] * G[j - 1];
        } else {
          temp1 = dp[i][j - 1][k - 1] + G[j - 1] * B[k - 1];
          temp2 = dp[i - 1][j][k - 1] + R[i - 1] * B[k - 1];
          temp3 = dp[i - 1][j - 1][k] + R[i - 1] * G[j - 1];
        }
        ans = max(temp1, temp2);
        ans = max(ans, temp3);
        dp[i][j][k] = ans;
      }
    }
  }
  for (int i = 0; i <= r; i++)
    for (int j = 0; j <= g; j++)
      for (int k = 0; k <= b; k++) ans = max(ans, dp[i][j][k]);
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test = 1;
  while (test--) solve();
  return 0;
}
