#include <bits/stdc++.h>
using namespace std;
template <typename T, size_t N>
int SIZE(const T (&t)[N]) {
  return N;
}
template <typename T>
int SIZE(const T& t) {
  return t.size();
}
string to_string(const string s, int x1 = 0, int x2 = 1e9) {
  return '"' + ((x1 < s.size()) ? s.substr(x1, x2 - x1 + 1) : "") + '"';
}
string to_string(const char* s) { return to_string((string)s); }
string to_string(const bool b) { return (b ? "true" : "false"); }
string to_string(const char c) { return string({c}); }
template <size_t N>
string to_string(const bitset<N>& b, int x1 = 0, int x2 = 1e9) {
  string t = "";
  for (int __iii__ = min(x1, SIZE(b)), __jjj__ = min(x2, SIZE(b) - 1);
       __iii__ <= __jjj__; ++__iii__) {
    t += b[__iii__] + '0';
  }
  return '"' + t + '"';
}
template <typename A, typename... C>
string to_string(const A(&v), int x1 = 0, int x2 = 1e9, C... coords);
int l_v_l_v_l = 0, t_a_b_s = 0;
template <typename A, typename B>
string to_string(const pair<A, B>& p) {
  l_v_l_v_l++;
  string res = "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
  l_v_l_v_l--;
  return res;
}
template <typename A, typename... C>
string to_string(const A(&v), int x1, int x2, C... coords) {
  int rnk = rank<A>::value;
  string tab(t_a_b_s, ' ');
  string res = "";
  bool first = true;
  if (l_v_l_v_l == 0) res += '\n';
  res += tab + "[";
  x1 = min(x1, SIZE(v)), x2 = min(x2, SIZE(v));
  auto l = begin(v);
  advance(l, x1);
  auto r = l;
  advance(r, (x2 - x1) + (x2 < SIZE(v)));
  for (auto e = l; e != r; e = next(e)) {
    if (!first) {
      res += ", ";
    }
    first = false;
    l_v_l_v_l++;
    if (e != l) {
      if (rnk > 1) {
        res += '\n';
        t_a_b_s = l_v_l_v_l;
      };
    } else {
      t_a_b_s = 0;
    }
    res += to_string(*e, coords...);
    l_v_l_v_l--;
  }
  res += "]";
  if (l_v_l_v_l == 0) res += '\n';
  return res;
}
void dbgm() { ; }
template <typename Heads, typename... Tails>
void dbgm(Heads H, Tails... T) {
  cout << to_string(H) << " | ";
  dbgm(T...);
}
const double PI = 1.00 * acos(-1.00);
bool sortbysec(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.second < b.second);
}
long long extendgcd(long long a, long long b, long long& x, long long& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  long long gcd = extendgcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return gcd;
}
void dfs(long long a[], bool vis[], long long pos, long long null,
         long long neg, long long n) {
  pos = 0;
  null = 0;
  neg = 0;
  for (long long i = 1; i < n; i++) {
    if (a[i] - a[i - 1] > 0)
      pos++;
    else if (a[i] - a[i - 1] == 0)
      null++;
    else
      neg++;
  }
  if (pos <= n / 2 and neg <= n / 2) return;
  for (long long i = 0; i < n; i++) {
    if (vis[i]) continue;
    vis[i] = 1;
    dfs(a, vis, pos, null, neg, n);
    if (pos <= n / 2 and neg <= n / 2) break;
    a[i] = -a[i];
    dfs(a, vis, pos, null, neg, n);
    a[i] = -a[i];
    vis[i] = 0;
  }
}
vector<long long> prime_fact(long long a) {
  vector<long long> v;
  while (a % 2 == 0) {
    a /= 2;
    v.push_back(2);
  }
  for (long long i = 3; i <= sqrt(a); i += 2) {
    while (a % i == 0) {
      a /= i;
      v.push_back(i);
    }
  }
  if (a > 2) v.push_back(a);
  return v;
}
void addEdgeUnd(vector<long long> adj[], long long a, long long b) {
  adj[a].push_back(b);
  adj[b].push_back(a);
}
long long dp[205][205][205];
long long find(long long red[], long long green[], long long blue[],
               long long r, long long g, long long b) {
  if (dp[r][g][b] != 0) return dp[r][g][b];
  long long ans = 0;
  if (r > 0 and g > 0)
    ans = max(ans, red[r - 1] * green[g - 1] +
                       find(red, green, blue, r - 1, g - 1, b));
  if (r > 0 and b > 0)
    ans = max(ans, red[r - 1] * blue[b - 1] +
                       find(red, green, blue, r - 1, g, b - 1));
  if (g > 0 and b > 0)
    ans = max(ans, blue[b - 1] * green[g - 1] +
                       find(red, green, blue, r, g - 1, b - 1));
  dp[r][g][b] = ans;
  return ans;
}
void solve() {
  long long n, m, i, j, k = 0, ct = 0;
  long long r, g, b;
  cin >> r >> g >> b;
  long long red[r];
  for (i = 0; i < r; i++) cin >> red[i];
  long long green[g];
  for (i = 0; i < g; i++) cin >> green[i];
  long long blue[b];
  for (i = 0; i < b; i++) cin >> blue[i];
  sort(red, red + r);
  sort(green, green + g);
  sort(blue, blue + b);
  memset(dp, 0, sizeof(dp));
  cout << find(red, green, blue, r, g, b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  long long t1 = t;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
