#include <bits/stdc++.h>
using namespace std;
template <class T>
using v2d = vector<vector<T> >;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
const int maxN = 2e2 + 10;
int R, G, B, r[maxN], g[maxN], b[maxN];
long long dp[maxN][maxN][maxN];
void solve() {
  cin >> R >> G >> B;
  for (int i = 1; i <= (int)(R); ++i) {
    cin >> r[i];
  }
  for (int i = 1; i <= (int)(G); ++i) {
    cin >> g[i];
  }
  for (int i = 1; i <= (int)(B); ++i) {
    cin >> b[i];
  }
  sort(r + 1, r + R + 1);
  sort(g + 1, g + G + 1);
  sort(b + 1, b + B + 1);
  for (int i = (int)(0); i <= (int)(R); ++i) {
    for (int j = (int)(0); j <= (int)(G); ++j) {
      for (int k = (int)(0); k <= (int)(B); ++k) {
        long long &cur = dp[i][j][k];
        if (i >= 1 && j >= 1) {
          uax(cur, dp[i - 1][j - 1][k] + r[i] * g[j]);
        }
        if (i >= 1 && k >= 1) {
          uax(cur, dp[i - 1][j][k - 1] + r[i] * b[k]);
        }
        if (j >= 1 && k >= 1) {
          uax(cur, dp[i][j - 1][k - 1] + g[j] * b[k]);
        }
      }
    }
  }
  cout << dp[R][G][B];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
