#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 11;
long long int add(long long int a, long long int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
  return a;
}
long long int mul(long long int a, long long int b) {
  a = (a * b) % 1000000007;
  return a;
}
void init() {}
long long int dp[205][205][205];
void kishu() {
  long long int na, nb, nc;
  cin >> na >> nb >> nc;
  vector<long long int> a(na + 1), b(nb + 1), c(nc + 1);
  a[0] = b[0] = c[0] = 0;
  for (long long int i = 1; i <= na; ++i) cin >> a[i];
  sort(a.begin() + 1, a.end(), greater<long long int>());
  for (long long int i = 1; i <= nb; ++i) cin >> b[i];
  sort(b.begin() + 1, b.end(), greater<long long int>());
  for (long long int i = 1; i <= nc; ++i) cin >> c[i];
  sort(c.begin() + 1, c.end(), greater<long long int>());
  long long int ans = 0;
  for (long long int i = 0; i <= na; ++i) {
    for (long long int j = 0; j <= nb; ++j) {
      for (long long int k = 0; k <= nc; ++k) {
        if (i && j)
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j - 1][k] + (a[i] * b[j]));
        if (i && k)
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j][k - 1] + (a[i] * c[k]));
        if (j && k)
          dp[i][j][k] = max(dp[i][j][k], dp[i][j - 1][k - 1] + (c[k] * b[j]));
        ans = max(ans, dp[i][j][k]);
      }
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  init();
  long long int t = 1;
  while (t--) {
    kishu();
  }
  return 0;
}
