#include <bits/stdc++.h>
using namespace std;
const int N = 222;
const int INF = 0x3f3f3f3f;
vector<int> sticks[3];
int dp[N][N][N];
vector<vector<int> > pss = {{0, 1}, {0, 2}, {1, 2}};
int solve(int r, int g, int b) {
  int res = 0;
  for (int i = 0; i < 3; i++) {
    sort(sticks[i].begin(), sticks[i].end(), greater<int>());
  }
  memset(dp, -1, sizeof(dp));
  dp[0][0][0] = 0;
  for (int i = 0; i <= r; i++) {
    for (int j = 0; j <= g; j++) {
      for (int k = 0; k <= b; k++) {
        int maxi = 0;
        for (const auto& ps : pss) {
          assert(ps.size() == 2);
          int cur[3] = {i, j, k};
          cur[ps[0]]--;
          cur[ps[1]]--;
          if (cur[ps[0]] < 0 || cur[ps[1]] < 0) {
            continue;
          }
          int u = dp[cur[0]][cur[1]][cur[2]];
          if (u < 0) {
            continue;
          }
          u += sticks[ps[0]][cur[ps[0]]] * sticks[ps[1]][cur[ps[1]]];
          maxi = max(maxi, u);
        }
        dp[i][j][k] = maxi;
        res = max(res, maxi);
      }
    }
  }
  return res;
}
int main() {
  int r, g, b;
  cin >> r >> g >> b;
  sticks[0].reserve(r);
  sticks[1].reserve(g);
  sticks[2].reserve(b);
  int num;
  for (int i = 0; i < r; i++) {
    scanf("%d", &num);
    sticks[0].push_back(num);
  }
  for (int i = 0; i < g; i++) {
    scanf("%d", &num);
    sticks[1].push_back(num);
  }
  for (int i = 0; i < b; i++) {
    scanf("%d", &num);
    sticks[2].push_back(num);
  }
  cout << solve(r, g, b) << endl;
  return 0;
}
