#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 220;
int r[maxn], g[maxn], b[maxn];
ll dp[maxn][maxn][maxn];
int main() {
int R, G, B;
scanf("%d%d%d", &R, &G, &B);
for (int i = 0; i < R; i++) scanf("%d", &r[i]);
for (int i = 0; i < G; i++) scanf("%d", &g[i]);
for (int i = 0; i < B; i++) scanf("%d", &b[i]);
sort(r, r + R, greater<int>());
sort(g, g + G, greater<int>());
sort(b, b + B, greater<int>());
ll ans = -1;
for (int i = 0; i <= R; i++)
for (int j = 0; j <= G; j++)
for (int k = 0; k <= B; k++) {
dp[i + 1][j + 1][k] = max(dp[i + 1][j + 1][k], dp[i][j][k] + 1ll * r[i] * g[j]);
dp[i + 1][j][k + 1] = max(dp[i + 1][j][k + 1], dp[i][j][k] + 1ll * r[i] * b[k]);
dp[i][j + 1][k + 1] = max(dp[i][j + 1][k + 1], dp[i][j][k] + 1ll * g[j] * b[k]);
ans = max({ans, dp[i + 1][j + 1][k], dp[i + 1][j][k + 1], dp[i][j + 1][k + 1]});
}
printf("%lld\n", ans);
return 0;
}