#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 205;
ll a[3][N];
int n[3];
ll dp[N][N][N];
ll solve(int x, int y, int z) {
  if (dp[x][y][z] != -1) return dp[x][y][z];
  ll res = 0;
  if (x <= n[0] && y <= n[1])
    res = max(res, a[0][x] * a[1][y] + solve(x + 1, y + 1, z));
  if (y <= n[1] && z <= n[2])
    res = max(res, a[1][y] * a[2][z] + solve(x, y + 1, z + 1));
  if (x <= n[0] && z <= n[2])
    res = max(res, a[0][x] * a[2][z] + solve(x + 1, y, z + 1));
  res = max(res, solve(x + 1, y + 1, z + 1));
  return dp[x][y][z] = res;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n[0] >> n[1] >> n[2];
  for (int i = 0; i < 3; i++) {
    for (int j = 1; j <= n[i]; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < 3; i++) sort(a[i] + 1, a[i] + n[i] + 1, greater<ll>());
  for (int i = 1; i <= 201; i++) {
    for (int j = 1; j <= 201; j++) {
      for (int k = 1; k <= 201; k++) {
        dp[i][j][k] = -1;
      }
    }
  }
  solve(1, 1, 1);
  cout << dp[1][1][1] << "\n";
  return 0;
}
