#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long first, unsigned long long second,
                unsigned long long m) {
  if (second == 0) return 1;
  long long p = power(first, second / 2, m) % m;
  p = (p * p) % m;
  return (second % 2 == 0) ? p : (first * p) % m;
}
long long modInverse(long long a, long long m) {
  { return power(a, m - 2, m); }
}
const long long maxn = 500003;
long long dp[203][203][203];
vector<long long> v[3];
long long cal(long long i, long long j, long long k) {
  long long cnt = 0;
  if (i == 0) cnt++;
  if (j == 0) cnt++;
  if (k == 0) cnt++;
  if (cnt > 1) return 0;
  long long ret = 0;
  if (dp[i][j][k] != -1) return dp[i][j][k];
  if (i && j) ret = max(ret, v[0][i - 1] * v[1][j - 1] + cal(i - 1, j - 1, k));
  if (j && k) ret = max(ret, v[1][j - 1] * v[2][k - 1] + cal(i, j - 1, k - 1));
  if (i && k) ret = max(ret, v[0][i - 1] * v[2][k - 1] + cal(i - 1, j, k - 1));
  return dp[i][j][k] = ret;
}
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  for (long long i = 0; i < a; i++) {
    long long first;
    cin >> first;
    v[0].push_back(first);
  }
  for (long long i = 0; i < b; i++) {
    long long first;
    cin >> first;
    v[1].push_back(first);
  }
  for (long long i = 0; i < c; i++) {
    long long first;
    cin >> first;
    v[2].push_back(first);
  }
  sort(v[0].begin(), v[0].end());
  sort(v[1].begin(), v[1].end());
  sort(v[2].begin(), v[2].end());
  long long ans = 0;
  memset(dp, -1, sizeof dp);
  cout << cal(a, b, c) << "\n";
}
signed main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
