#include <bits/stdc++.h>
using namespace std;
using longInt = long long;
const int maxL = 204;
int r[maxL], g[maxL], b[maxL], l[3];
longInt f[maxL][maxL][maxL];
void get_array(int *a, int n) {
  for (int i = 1; i <= n; ++i) cin >> a[i];
  sort(a + 1, a + n + 1, [](int x, int y) -> bool { return x > y; });
}
int main() {
  ios::sync_with_stdio(false);
  longInt ans = 0;
  cin >> l[0] >> l[1] >> l[2];
  get_array(r, l[0]);
  get_array(g, l[1]);
  get_array(b, l[2]);
  for (int i = 0; i <= l[0]; ++i)
    for (int j = 0; j <= l[1]; ++j)
      for (int k = 0; k <= l[2]; ++k) {
        f[i][j][k] = 0;
        if (i > 0 && j > 0)
          f[i][j][k] = max(f[i][j][k], f[i - 1][j - 1][k] + r[i] * g[j]);
        if (j > 0 && k > 0)
          f[i][j][k] = max(f[i][j][k], f[i][j - 1][k - 1] + g[j] * b[k]);
        if (k > 0 && i > 0)
          f[i][j][k] = max(f[i][j][k], f[i - 1][j][k - 1] + b[k] * r[i]);
        ans = max(ans, f[i][j][k]);
      }
  cout << ans << endl;
  return 0;
}
