#include <bits/stdc++.h>
using namespace std;
long long int Powerm(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long int t = Powerm(a, b / 2, m);
  t = (t * t) % m;
  if (b & 1) t = (t * a) % m;
  return t;
}
long long int Power(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long int t = Power(a, b / 2);
  t = (t * t);
  if (b & 1) t = (t * a);
  return t;
}
long long int Gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  } else {
    return Gcd(b, a % b);
  }
}
long long int LeftMostSetBit(long long int n) {
  if (n == 0) {
    return 0;
  }
  long long int msb = 0;
  while (n != 0) {
    n = n / 2;
    msb++;
  }
  return msb;
}
long long int RightMostSetBit(long long int n) { return __builtin_ffsl(n); }
long long int LLsqrt(long long int x) {
  if (x == 0 || x == 1) return x;
  long long int start = 1, end = x / 2, ans;
  while (start <= end) {
    long long int mid = (start + end) / 2;
    if (mid * mid == x)
      return mid;
    else if (mid <= x / mid)
      ans = mid, start = mid + 1;
    else
      end = mid - 1;
  }
  return ans;
}
void input() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long int R, G, B;
long long int dp[201][201][201];
long long int ans;
long long int solve(long long int r[], long long int g[], long long int b[],
                    long long int i, long long int j, long long int k) {
  long long int ans1 = 0, ans2 = 0, ans3 = 0;
  if (dp[i][j][k] != -1) {
    return dp[i][j][k];
  }
  if (j < G && k < B) {
    ans1 = g[j] * b[k] + solve(r, g, b, i, j + 1, k + 1);
  }
  if (i < R && k < B) {
    ans2 = r[i] * b[k] + solve(r, g, b, i + 1, j, k + 1);
  }
  if (i < R && j < G) {
    ans3 = r[i] * g[j] + solve(r, g, b, i + 1, j + 1, k);
  }
  return dp[i][j][k] = max(ans3, max(ans1, ans2));
}
int main() {
  input();
  ans = 0;
  cin >> R >> G >> B;
  long long int r[R], g[G], b[B];
  for (long long int i = 0; i < R; i++) {
    cin >> r[i];
  }
  for (long long int i = 0; i < G; i++) {
    cin >> g[i];
  }
  for (long long int i = 0; i < B; i++) {
    cin >> b[i];
  }
  sort(r, r + R, greater<long long int>());
  sort(g, g + G, greater<long long int>());
  sort(b, b + B, greater<long long int>());
  memset(dp, -1, sizeof(dp));
  cout << solve(r, g, b, 0, 0, 0) << endl;
}
