#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
long long TESTCASE_NUM = 1;
long long TESTCASE_CUR = 1;
template <typename T>
inline void _read(T &x) {
  cin >> x;
}
inline void _read(int &x) { scanf("%d", &x); }
inline void _read(long long &x) { scanf("%lld", &x); }
inline void _read(float &x) { scanf("%f", &x); }
inline void _read(double &x) { scanf("%lf", &x); }
inline void _read(char &x) { x = getchar(); }
inline void _read(char *x) { scanf("%s", x); }
inline void read() {}
template <typename T, typename... U>
inline void read(T &head, U &...tail) {
  _read(head);
  read(tail...);
}
template <typename T>
inline void _write(const T &x) {
  cout << x;
}
inline void _write(const int &x) { printf("%d", x); }
inline void _write(const long long &x) { printf("%lld", x); }
inline void _write(const float &x) { printf("%.6f", x); }
inline void _write(const double &x) { printf("%.8lf", x); }
inline void _write(const char &x) { putchar(x); }
inline void _write(const char *x) { printf("%s", x); }
inline void write() {}
template <typename T, typename... U>
inline void write(const T &head, const U &...tail) {
  _write(head);
  write(tail...);
}
inline void debug() {}
template <typename T, typename... U>
inline void debug(const T &head, const U &...tail) {}
void solve();
void init();
template <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
template <typename T>
inline bool isprime(T p) {
  if (p == 2 || p == 3) return 1;
  if (p < 2 || (p % 6 != 1 && p % 6 != 5)) return 0;
  for (T i = 5; i * i <= p; i = i + 6)
    if (p % i == 0 || p % (i + 2) == 0) return 0;
  return 1;
}
template <typename T1, typename T2, typename T3>
T1 qpow(T1 a, T2 b, T3 m) {
  T1 ans = 1, base = a;
  while (b) {
    if (b & 1) ans = ans * base % m;
    base = base * base % m;
    b >>= 1;
  }
  return ans;
}
template <typename T1, typename T2>
T1 qpow(T1 a, T2 b) {
  T1 ans = 1, base = a;
  while (b) {
    if (b & 1) ans = ans * base;
    base = base * base;
    b >>= 1;
  }
  return ans;
}
template <typename T1, typename T2>
T1 inv(T1 i, T2 m) {
  return qpow(i, m - 2, m);
}
void DISPLAY_DEBUG_INFO() {}
signed main() {
  init();
  for (TESTCASE_CUR = 1; TESTCASE_CUR <= TESTCASE_NUM; TESTCASE_CUR++) {
    solve();
  }
  DISPLAY_DEBUG_INFO();
  return 0;
}
const int MAXN = 210;
const int MOD = 998244353;
const int INF = 0x3f3f3f3f;
void init() {}
long long a[MAXN], b[MAXN], c[MAXN];
long long dp[MAXN][MAXN][MAXN];
void solve() {
  long long n, m, o;
  read(n, m, o);
  for (int i = 1; i <= n; i++) {
    read(a[i]);
  }
  for (int i = 1; i <= m; i++) {
    read(b[i]);
  }
  for (int i = 1; i <= o; i++) {
    read(c[i]);
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  sort(c + 1, c + o + 1);
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      for (int k = 0; k <= o; k++) {
        if (i != 0) dp[i][j][k] = max(dp[i - 1][j][k], dp[i][j][k]);
        if (j != 0) dp[i][j][k] = max(dp[i][j - 1][k], dp[i][j][k]);
        if (k != 0) dp[i][j][k] = max(dp[i][j][k - 1], dp[i][j][k]);
        if (i != 0 && j != 0)
          dp[i][j][k] = max(dp[i - 1][j - 1][k] + a[i] * b[j], dp[i][j][k]);
        if (k != 0 && j != 0)
          dp[i][j][k] = max(dp[i][j - 1][k - 1] + b[j] * c[k], dp[i][j][k]);
        if (i != 0 && k != 0)
          dp[i][j][k] = max(dp[i - 1][j][k - 1] + a[i] * c[k], dp[i][j][k]);
      }
    }
  }
  write(dp[n][m][o], '\n');
}
