#include <bits/stdc++.h>
using namespace std;
const long long INF = LLONG_MAX;
const long long SZ = 200 + 5;
const long long mod = 1e9 + 7;
long long n, r, g, b;
long long rr[SZ];
long long gg[SZ];
long long bb[SZ];
long long dp[SZ][SZ][SZ];
long long solve(long long i, long long j, long long k) {
  if ((i > r && j > g) || (i > r && k > b) || (k > b && j > g)) return 0;
  if (dp[i][j][k] != -1) return dp[i][j][k];
  long long res(0);
  long long t1(0), t2(0), t3(0);
  if (i <= r && j <= g) t1 = (rr[i] * gg[j]) + solve(i + 1, j + 1, k);
  if (i <= r && k <= b) t2 = (rr[i] * bb[k]) + solve(i + 1, j, k + 1);
  if (j <= g && k <= b) t3 = (gg[j] * bb[k]) + solve(i, j + 1, k + 1);
  res = max({t1, t2, t3});
  return dp[i][j][k] = res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long cs = 0, tc = 1, x, y, z, i, j, k, p, q, ans = 0, sum = 0, t = 0;
  string s, s1, s2;
  cin >> r >> g >> b;
  for (i = 1; i <= r; i++) cin >> rr[i];
  for (i = 1; i <= g; i++) cin >> gg[i];
  for (i = 1; i <= b; i++) cin >> bb[i];
  sort(rr + 1, rr + r + 1, greater<long long>());
  sort(gg + 1, gg + g + 1, greater<long long>());
  sort(bb + 1, bb + b + 1, greater<long long>());
  memset(dp, -1, sizeof dp);
  ans = solve(1, 1, 1);
  cout << ans << "\n";
  return 0;
}
