#include <bits/stdc++.h>
using namespace std;
void max_self(long long &a, long long b) { a = max(a, b); }
void test_case() {
  vector<long long> sz(3);
  for (long long &x : sz) cin >> x;
  vector<vector<long long>> a(3);
  for (long long i = 0; i < 3; ++i) {
    a[i].resize(sz[i]);
    for (long long &x : a[i]) cin >> x;
    sort(a[i].rbegin(), a[i].rend());
  }
  vector<vector<vector<long long>>> dp(
      sz[0] + 1,
      vector<vector<long long>>(sz[1] + 1, vector<long long>(sz[2] + 1)));
  long long ans = 0;
  for (long long i = 0; i <= sz[0]; ++i)
    for (long long j = 0; j <= sz[1]; ++j)
      for (long long k = 0; k <= sz[2]; ++k) {
        if (i < sz[0] && j < sz[1])
          max_self(dp[i + 1][j + 1][k], dp[i][j][k] + a[0][i] * a[1][j]);
        if (j < sz[1] && k < sz[2])
          max_self(dp[i][j + 1][k + 1], dp[i][j][k] + a[1][j] * a[2][k]);
        if (i < sz[0] && k < sz[2])
          max_self(dp[i + 1][j][k + 1], dp[i][j][k] + a[0][i] * a[2][k]);
        max_self(ans, dp[i][j][k]);
      }
  cout << ans << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long T = 1;
  while (T--) test_case();
}
