#include <bits/stdc++.h>
char _;
using namespace std;
void PRINT(int x, int y) {
  for (int i = y - 1; i >= 0; i--) {
    cout << ((0u == (x & (1 << i))) ? 0u : 1u);
  }
  cout << endl;
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
int dp[205][205][205] = {0};
vector<int> r = {-1}, g = {-1}, b = {-1};
int solve(int R, int G, int B) {
  if (dp[R][G][B] != -1) {
    return dp[R][G][B];
  } else if (R + G + B - max({R, G, B}) == 0) {
    dp[R][G][B] = 0;
  } else {
    vector<pair<int, int> > options = {{r[R], R}, {g[G], G}, {b[B], B}};
    dp[R][G][B] = 0;
    for (int x = 0; x < 3; x++) {
      for (int i = x + 1; i < 3; i++) {
        if (options[i].second != 0 && options[x].second != 0) {
          options[x].second--;
          options[i].second--;
          dp[R][G][B] = max(
              dp[R][G][B],
              solve(options[0].second, options[1].second, options[2].second) +
                  options[i].first * options[x].first);
          options[x].second++;
          options[i].second++;
        }
      }
    }
  }
  return dp[R][G][B];
}
int main() {
  int R, G, B;
  cin.sync_with_stdio(0);
  cin.tie(0);
  memset(dp, -1, sizeof(dp));
  cin >> R >> G >> B;
  int cur;
  for (int x = 0; x < R; x++) {
    cin >> cur;
    r.push_back(cur);
  }
  for (int x = 0; x < G; x++) {
    cin >> cur;
    g.push_back(cur);
  }
  for (int x = 0; x < B; x++) {
    cin >> cur;
    b.push_back(cur);
  }
  sort((r).begin(), (r).end());
  sort((g).begin(), (g).end());
  sort((b).begin(), (b).end());
  cout << solve(R, G, B) << "\n";
  return 0;
}
