#include <bits/stdc++.h>
using namespace std;
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class T>
ostream& operator<<(ostream& os, multiset<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.F << ":" << m.S << ") ";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " |";
  __f(comma + 1, args...);
}
void solve() {
  int r, g, b;
  cin >> r >> g >> b;
  vector<int> ra(r), ga(g), ba(b);
  for (int& i : ra) cin >> i;
  for (int& i : ga) cin >> i;
  for (int& i : ba) cin >> i;
  sort(ra.begin(), ra.end());
  reverse(ra.begin(), ra.end());
  sort(ga.begin(), ga.end());
  reverse(ga.begin(), ga.end());
  sort(ba.begin(), ba.end());
  reverse(ba.begin(), ba.end());
  vector<vector<vector<int> > > DP(
      r + 1, vector<vector<int> >(g + 1, vector<int>(b + 1, INT_MIN)));
  DP[0][0][0] = 0;
  int mx = 0;
  for (int i = 0; i <= r; ++i) {
    for (int j = 0; j <= g; ++j) {
      for (int k = 0; k <= b; ++k) {
        if (i and j)
          DP[i][j][k] =
              max(DP[i - 1][j - 1][k] + ra[i - 1] * ga[j - 1], DP[i][j][k]);
        if (j and k)
          DP[i][j][k] =
              max(DP[i][j - 1][k - 1] + ga[j - 1] * ba[k - 1], DP[i][j][k]);
        if (k and i)
          DP[i][j][k] =
              max(DP[i - 1][j][k - 1] + ra[i - 1] * ba[k - 1], DP[i][j][k]);
        mx = max(mx, DP[i][j][k]);
      }
    }
  }
  cout << mx << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1, tc = 1;
  while (T--) {
    solve();
  }
  return 0;
}
