#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long double eps = 1e-12;
long long dx[] = {0, 0, 1, -1};
long long dy[] = {1, -1, 0, 0};
long long n, res = 0, k = 0, h, ans = 0, m, level = 0;
;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long x, long long y) { return (x * y) / gcd(x, y); }
vector<long long> v[300005], vnode;
void add_edge(long long x, long long y) {
  v[x].push_back(y);
  v[y].push_back(x);
}
string s2, ch = "", s, s1 = "", t;
vector<pair<string, long long> > vm;
vector<pair<pair<long long, long long>, long long> > vvvl, vvvr;
vector<pair<long long, long long> > vv, vv2;
long long ar[500005], ab[500005], ag[500005], dp[202][202][202];
map<long long, long long> mp;
long long r, g, b;
long long solve(long long i, long long j, long long k) {
  long long cnt = 0;
  cnt += (i > r);
  cnt += (j > g);
  cnt += (k > b);
  if (cnt >= 2) return 0;
  long long &ret = dp[i][j][k];
  if (ret != -1) return ret;
  long long ans = 0;
  if (i <= r) {
    if (j <= g) {
      ans = max(ans, ar[i] * ag[j] + solve(i + 1, j + 1, k));
    }
    if (k <= b) {
      ans = max(ans, ar[i] * ab[k] + solve(i + 1, j, k + 1));
    }
  }
  if (j <= g && k <= b) {
    ans = max(ans, ag[j] * ab[k] + solve(i, j + 1, k + 1));
  }
  return ret = ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long i = 0, x = 0, z = 0, y = 0, j = 0, q, mx = 0, mm, idx = 0, ok = 0,
            l = 0, negatif = 0, positif = 0, l1, r1, d, p;
  set<pair<long long, long long> >::iterator it1, it2;
  multiset<long long>::iterator it;
  multiset<long long> mst1, mst2;
  cin >> r >> g >> b;
  for (i = 1; i <= (long long)(r); i++) cin >> ar[i];
  for (i = 1; i <= (long long)(g); i++) cin >> ag[i];
  for (i = 1; i <= (long long)(b); i++) cin >> ab[i];
  sort(ar + 1, ar + 1 + r, greater<long long>());
  sort(ab + 1, ab + 1 + b, greater<long long>());
  sort(ag + 1, ag + 1 + g, greater<long long>());
  memset(dp, -1, sizeof(dp));
  res = solve(1, 1, 1);
  cout << res;
  return 0;
}
