#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1e9 + 7;
const int N = 205;
int arr[3][N];
int num[3];
long long dp[N][N][N];
long long solve(int r, int g, int b) {
  if (r > num[0] || g > num[1] || b > num[2]) return 0;
  if (dp[r][g][b] != -1) return dp[r][g][b];
  long long x = solve(r + 1, g + 1, b) + arr[0][r] * arr[1][g];
  long long y = solve(r + 1, g, b + 1) + arr[0][r] * arr[2][b];
  long long z = solve(r, g + 1, b + 1) + arr[1][g] * arr[2][b];
  return dp[r][g][b] = max({x, y, z});
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int numCases = 1;
  for (int caseNo = 1; caseNo <= numCases; caseNo++) {
    for (int i = 0; i < 3; i++) cin >> num[i];
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < num[i]; j++) cin >> arr[i][j];
      sort(arr[i], arr[i] + num[i]);
      reverse(arr[i], arr[i] + num[i]);
    }
    memset(dp, -1, sizeof(dp));
    cout << solve(0, 0, 0) << endl;
  }
}
