#include <bits/stdc++.h>
using namespace std;
const int maxN = 202;
int n, m, o;
long long int r[maxN], g[maxN], b[maxN];
long long int dp[maxN][maxN][maxN];
long long int solve(int i, int j, int k) {
  long long int &ans = dp[i][j][k];
  if (ans != -1) return ans;
  ans = 0;
  if (i > 0 && j > 0) {
    ans = max(ans, r[i] * g[j] + solve(i - 1, j - 1, k));
  }
  if (j > 0 && k > 0) {
    ans = max(ans, g[j] * b[k] + solve(i, j - 1, k - 1));
  }
  if (i > 0 && k > 0) {
    ans = max(ans, r[i] * b[k] + solve(i - 1, j, k - 1));
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> o;
  for (int i = 1; i < n + 1; i++) cin >> r[i];
  for (int i = 1; i < m + 1; i++) cin >> g[i];
  for (int i = 1; i < o + 1; i++) cin >> b[i];
  r[0] = g[0] = b[0] = 0;
  sort(r, r + n + 1);
  sort(g, g + m + 1);
  sort(b, b + o + 1);
  memset(dp, -1, sizeof(dp));
  cout << solve(n, m, o) << "\n";
  ;
}
