#include <bits/stdc++.h>
using namespace std;
long long dp[250][250][250];
signed main() {
  long long rsize, bsize, gsize;
  cin >> rsize >> bsize >> gsize;
  vector<long long> r(rsize);
  vector<long long> b(bsize);
  vector<long long> g(gsize);
  for (long long i = 0; i < rsize; i++) {
    cin >> r[i];
  }
  for (long long i = 0; i < bsize; i++) {
    cin >> b[i];
  }
  for (long long i = 0; i < gsize; i++) {
    cin >> g[i];
  }
  sort(r.begin(), r.end(), greater<long long>());
  sort(b.begin(), b.end(), greater<long long>());
  sort(g.begin(), g.end(), greater<long long>());
  for (long long i = 0; i <= rsize; i++) {
    for (long long j = 0; j <= bsize; j++) {
      for (long long z = 0; z <= gsize; z++) {
        dp[i][j][z] = -INT_MAX;
      }
    }
  }
  dp[0][0][0] = 0;
  for (long long i = 0; i <= rsize; i++) {
    for (long long j = 0; j <= bsize; j++) {
      for (long long z = 0; z <= gsize; z++) {
        if (i >= 1 && j >= 1) {
          dp[i][j][z] =
              max(dp[i][j][z], dp[i - 1][j - 1][z] + r[i - 1] * b[j - 1]);
        }
        if (j >= 1 && z >= 1) {
          dp[i][j][z] =
              max(dp[i][j][z], dp[i][j - 1][z - 1] + b[j - 1] * g[z - 1]);
        }
        if (i >= 1 && z >= 1) {
          dp[i][j][z] =
              max(dp[i][j][z], dp[i - 1][j][z - 1] + r[i - 1] * g[z - 1]);
        }
      }
    }
  }
  long long ans = 0;
  for (long long i = 0; i <= rsize; i++) {
    for (long long j = 0; j <= bsize; j++) {
      for (long long z = 0; z <= gsize; z++) {
        ans = max(ans, dp[i][j][z]);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
