#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx")
using namespace std;
const long long maxn = 200 + 20;
ostream& operator<<(ostream& out, vector<long long>& v) {
  for (auto& x : v) out << x << ' ';
  return out;
}
ostream& operator<<(ostream& out, pair<long long, long long>& v) {
  out << v.first << ", " << v.second;
  return out;
}
istream& operator>>(istream& in, pair<long long, long long>& a) {
  in >> a.first >> a.second;
  return in;
}
const long long inf = (long long)2e9;
const long double pi = asin(1) * 2;
const long double eps = 1e-8;
const long long mod = (long long)1e9 + 7;
const long long ns = 97;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
long long dp[maxn][maxn][maxn];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long a, b, c;
  cin >> a >> b >> c;
  vector<long long> goo(a), moo(b), koo(c);
  for (auto& x : goo) cin >> x;
  for (auto& x : moo) cin >> x;
  for (auto& x : koo) cin >> x;
  sort(goo.begin(), goo.end());
  sort(moo.begin(), moo.end());
  sort(koo.begin(), koo.end());
  reverse(goo.begin(), goo.end());
  reverse(moo.begin(), moo.end());
  reverse(koo.begin(), koo.end());
  goo.push_back(0);
  moo.push_back(0);
  koo.push_back(0);
  dp[0][1][1] = moo.front() * koo.front();
  dp[1][1][0] = goo.front() * moo.front();
  dp[1][0][1] = goo.front() * koo.front();
  for (long long i = 0; i < a + 1; ++i) {
    for (long long j = 0; j < b + 1; ++j) {
      for (long long k = 0; k < c + 1; ++k) {
        dp[i + 1][j + 1][k] =
            max(dp[i + 1][j + 1][k], dp[i][j][k] + goo[i] * moo[j]);
        dp[i + 1][j][k + 1] =
            max(dp[i + 1][j][k + 1], dp[i][j][k] + goo[i] * koo[k]);
        dp[i][j + 1][k + 1] =
            max(dp[i][j + 1][k + 1], dp[i][j][k] + moo[j] * koo[k]);
      }
    }
  }
  long long mx = 0;
  for (long long i = 0; i < a + 2; ++i)
    for (long long j = 0; j < b + 2; ++j)
      for (long long k = 0; k < c + 2; ++k) mx = max(mx, dp[i][j][k]);
  cout << mx << '\n';
}
