#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
const long long inf = 4e18;
const int infi = 1e9;
long long i, j, n, m, k, qq = 1, ma = -inf, mi = inf, fr, to, w, x, y,
                         mod = 1e9 + 7;
char ch;
bool cmp(vector<long long> a, vector<long long> b) {
  return a.size() < b.size();
}
long long dp[201][201][201], a[3][201];
void solve() {
  long long R, B, G;
  cin >> R >> G >> B;
  for (i = 1; i <= R; i++) cin >> a[0][i];
  for (i = 1; i <= G; i++) cin >> a[1][i];
  for (i = 1; i <= B; i++) cin >> a[2][i];
  sort(a[0] + 1, a[0] + 1 + R);
  sort(a[1] + 1, a[1] + 1 + G);
  sort(a[2] + 1, a[2] + 1 + B);
  for (i = R; i >= 0; i--) {
    for (j = G; j >= 0; j--) {
      for (k = B; k >= 0; k--) {
        if (i > 0 && j > 0)
          dp[i - 1][j - 1][k] =
              max(dp[i - 1][j - 1][k], dp[i][j][k] + a[0][i] * a[1][j]);
        if (i > 0 && k > 0)
          dp[i - 1][j][k - 1] =
              max(dp[i - 1][j][k - 1], dp[i][j][k] + a[0][i] * a[2][k]);
        if (j > 0 && k > 0)
          dp[i][j - 1][k - 1] =
              max(dp[i][j - 1][k - 1], dp[i][j][k] + a[1][j] * a[2][k]);
      }
    }
  }
  long long ans = 0;
  for (i = 0; i < 200; i++) {
    for (j = 0; j < 200; j++) {
      for (k = 0; k < 200; k++) {
        ans = max(ans, dp[i][j][k]);
      }
    }
  }
  cout << ans << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (qq == 0) cin >> qq;
  while (qq--) {
    solve();
  }
}
