#include <bits/stdc++.h>
using namespace std;
const long mn = 2e2 + 1;
long long red, blue, green, r[mn], b[mn], g[mn], f[mn][mn][mn], ans = 0;
int main() {
  cin >> red >> green >> blue;
  for (long i = 1; i <= red; ++i) cin >> r[i];
  for (long j = 1; j <= green; ++j) cin >> g[j];
  for (long i = 1; i <= blue; ++i) cin >> b[i];
  sort(r + 1, r + red + 1);
  sort(g + 1, g + green + 1);
  sort(b + 1, b + blue + 1);
  for (long i = 0; i <= red; ++i) {
    for (long j = 0; j <= green; ++j) {
      for (long k = 0; k <= blue; ++k) {
        if (i && j)
          f[i][j][k] = max(f[i][j][k], f[i - 1][j - 1][k] + r[i] * g[j]);
        if (j && k)
          f[i][j][k] = max(f[i][j][k], f[i][j - 1][k - 1] + g[j] * b[k]);
        if (i && k)
          f[i][j][k] = max(f[i][j][k], f[i - 1][j][k - 1] + r[i] * b[k]);
        ans = max(ans, f[i][j][k]);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
