#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> r;
vector<int> g;
vector<int> b;
long long int dp[201][201][201];
long long int solve(int x, int y, int z) {
  if ((x == n && y == m) || (x == n && z == k) || (z == k && y == m)) return 0;
  if (dp[x][y][z] != -1) return dp[x][y][z];
  if (x < n && y < m && z < k)
    return dp[x][y][z] = max({r[x] * 1ll * g[y] + solve(x + 1, y + 1, z),
                              g[y] * 1ll * b[z] + solve(x, y + 1, z + 1),
                              r[x] * 1ll * b[z] + solve(x + 1, y, z + 1)});
  if (x < n && y < m)
    return dp[x][y][z] = r[x] * 1ll * g[y] + solve(x + 1, y + 1, z);
  if (x < n && z < k)
    return dp[x][y][z] = r[x] * 1ll * b[z] + solve(x + 1, y, z + 1);
  if (y < m && z < k)
    return dp[x][y][z] = g[y] * 1ll * b[z] + solve(x, y + 1, z + 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> k;
  r = vector<int>(n, 0);
  g = vector<int>(m, 0);
  b = vector<int>(k, 0);
  for (int i = 0; i < n; i++) cin >> r[i];
  for (int i = 0; i < m; i++) cin >> g[i];
  for (int i = 0; i < k; 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>());
  memset(dp, -1, sizeof(dp));
  cout << solve(0, 0, 0);
  return 0;
}
