#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 200;
int a[3][maxn], n[3], dp[maxn + 1][maxn + 1][maxn + 1];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  for (int i = 0; i < 3; ++i) {
    cin >> n[i];
  }
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < n[i]; ++j) {
      cin >> a[i][j];
    }
    sort(a[i], a[i] + n[i]);
    reverse(a[i], a[i] + n[i]);
  }
  int ans = 0;
  for (int i = 0; i <= n[0]; ++i) {
    for (int j = 0; j <= n[1]; ++j) {
      for (int k = 0; k <= n[2]; ++k) {
        dp[i][j][k] = 0;
        if (j > 0 && k > 0) {
          dp[i][j][k] =
              max(dp[i][j][k], dp[i][j - 1][k - 1] + a[1][j - 1] * a[2][k - 1]);
        }
        if (i > 0 && j > 0) {
          dp[i][j][k] =
              max(dp[i][j][k], dp[i - 1][j - 1][k] + a[0][i - 1] * a[1][j - 1]);
        }
        if (i > 0 && k > 0) {
          dp[i][j][k] =
              max(dp[i][j][k], dp[i - 1][j][k - 1] + a[0][i - 1] * a[2][k - 1]);
        }
        ans = max(ans, dp[i][j][k]);
      }
    }
  }
  cout << ans << "\n";
}
