#include <bits/stdc++.h>
using namespace std;
long long r, g, b;
vector<long long> u, v, w;
long long dp[202][202][202];
long long solve(long long fr, long long sc, long long tr) {
  long long dd = 0;
  if (fr == r) dd++;
  if (sc == g) dd++;
  if (tr == b) dd++;
  if (dd >= 2) {
    return 0;
  } else if (dp[fr][sc][tr] != -1)
    return dp[fr][sc][tr];
  else {
    long long p = 0, q = 0, x = 0, z, s;
    if (fr < r && sc < g) {
      z = u[fr] * v[sc];
      p = z + solve(fr + 1, sc + 1, tr);
    }
    if (fr < r && tr < b) {
      z = u[fr] * w[tr];
      q = z + solve(fr + 1, sc, tr + 1);
    }
    if (tr < b && sc < g) {
      z = w[tr] * v[sc];
      x = z + solve(fr, sc + 1, tr + 1);
    }
    s = max(p, q);
    s = max(s, x);
    dp[fr][sc][tr] = s;
    return dp[fr][sc][tr];
  }
}
int main() {
  long long n, m, a, c, d, e, f, h, p, q, sz, tz, i, j, k, mx = LLONG_MIN,
                                                           mn = LLONG_MAX;
  long long x = 0, y = 0, cnt = 0, res = 0, ttl = 0, ans, sum = 0;
  long long flg = 0, flag = 1, na = 0, as = 1;
  vector<pair<long long, long long> > vct;
  vector<string> vst;
  set<long long> st, nt, tt;
  map<long long, long long> mp, nq, qr;
  string str, ttr, ntr;
  scanf("%lld %lld %lld", &r, &g, &b);
  for (i = 0; i < r; i++) {
    scanf("%lld", &a);
    u.push_back(a);
  }
  for (i = 0; i < g; i++) {
    scanf("%lld", &a);
    v.push_back(a);
  }
  for (i = 0; i < b; i++) {
    scanf("%lld", &a);
    w.push_back(a);
  }
  sort(u.begin(), u.end());
  reverse(u.begin(), u.end());
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  sort(w.begin(), w.end());
  reverse(w.begin(), w.end());
  memset(dp, -1, sizeof dp);
  ans = solve(0, 0, 0);
  printf("%lld\n", ans);
  return 0;
}
