#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
void fast_io() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int MR = 210;
int dp[MR][MR][MR], R[MR], G[MR], B[MR];
int go(int r, int g, int b) {
  if (r + g == 0 || r + b == 0 || g + b == 0) return 0;
  if (dp[r][g][b]) return dp[r][g][b];
  int res = r && g ? R[r - 1] * G[g - 1] + go(r - 1, g - 1, b) : 0;
  if (r && b) res = max(res, R[r - 1] * B[b - 1] + go(r - 1, g, b - 1));
  if (g && b) res = max(res, G[g - 1] * B[b - 1] + go(r, g - 1, b - 1));
  return dp[r][g][b] = res;
}
int main() {
  fast_io();
  int r, g, b;
  scanf("%d%d%d", &r, &g, &b);
  for (int i = 0; i < (r); ++i) scanf("%d", &R[i]);
  sort(R, R + r);
  for (int i = 0; i < (g); ++i) scanf("%d", &G[i]);
  sort(G, G + g);
  for (int i = 0; i < (b); ++i) scanf("%d", &B[i]);
  sort(B, B + b);
  printf("%d\n", go(r, g, b));
  return 0;
}
