#include <bits/stdc++.h>
using namespace std;
int R, G, B;
int r[200];
int g[200];
int b[200];
int dp[201][201][201];
int tmp;
int max(int x, int y) {
  if (x > y) {
    return x;
  } else {
    return y;
  }
}
int main(void) {
  cin >> R >> G >> B;
  for (int c1 = 0; c1 < R; c1++) {
    cin >> r[c1];
  }
  for (int c1 = 0; c1 < G; c1++) {
    cin >> g[c1];
  }
  for (int c1 = 0; c1 < B; c1++) {
    cin >> b[c1];
  }
  for (int c1 = 0; c1 < 200; c1++) {
    for (int c2 = 0; c2 < R - 1; c2++) {
      if (r[c2 + 1] > r[c2]) {
        tmp = r[c2 + 1];
        r[c2 + 1] = r[c2];
        r[c2] = tmp;
      }
    }
  }
  for (int c1 = 0; c1 < 200; c1++) {
    for (int c2 = 0; c2 < G - 1; c2++) {
      if (g[c2 + 1] > g[c2]) {
        tmp = g[c2 + 1];
        g[c2 + 1] = g[c2];
        g[c2] = tmp;
      }
    }
  }
  for (int c1 = 0; c1 < 200; c1++) {
    for (int c2 = 0; c2 < B - 1; c2++) {
      if (b[c2 + 1] > b[c2]) {
        tmp = b[c2 + 1];
        b[c2 + 1] = b[c2];
        b[c2] = tmp;
      }
    }
  }
  int mx = 0;
  for (int c1 = 0; c1 <= R; c1++) {
    for (int c2 = 0; c2 <= G; c2++) {
      for (int c3 = 0; c3 <= B; c3++) {
        if ((c1 > 0) && (c2 > 0)) {
          dp[c1][c2][c3] = max(dp[c1][c2][c3],
                               dp[c1 - 1][c2 - 1][c3] + r[c1 - 1] * g[c2 - 1]);
        }
        if ((c1 > 0) && (c3 > 0)) {
          dp[c1][c2][c3] = max(dp[c1][c2][c3],
                               dp[c1 - 1][c2][c3 - 1] + r[c1 - 1] * b[c3 - 1]);
        }
        if ((c2 > 0) && (c3 > 0)) {
          dp[c1][c2][c3] = max(dp[c1][c2][c3],
                               dp[c1][c2 - 1][c3 - 1] + g[c2 - 1] * b[c3 - 1]);
        }
        mx = max(mx, dp[c1][c2][c3]);
      }
    }
  }
  cout << mx;
  return 0;
}
