############################################################# import sys sys.setrecursionlimit(10**7) from heapq import heappop,heappush from collections import deque,defaultdict,Counter from bisect import bisect_left, bisect_right from itertools import product,combinations,permutations ipt = sys.stdin.readline def iin(): return int(ipt()) def lmin(): return list(map(int,ipt().split())) import random import time from math import exp TL = 0.3 T0,T1 = 10000,1 MOD = 998244353 ############################################################# start_time = time.time() NA,NB,NC = lmin() A = lmin() B = lmin() C = lmin() A.sort(reverse=True) B.sort(reverse=True) C.sort(reverse=True) SA = [0] SB = [0] SC = [0] for a in A: SA.append(SA[-1]+a) for b in B: SB.append(SB[-1]+b) for c in C: SC.append(SC[-1]+c) d = [(1,0,0),(-1,0,0),(0,1,0),(0,-1,0),(0,0,1),(0,0,-1)] def calc_score(i,j,k): return SA[i]*j+SB[j]*k+SC[k]*i ans = 0 while time.time() - start_time + TL <= 2.98: ca,cb,cc = random.randrange(NA),random.randrange(NB),random.randrange(NC) cur_time = 0 cnt = 0 score = calc_score(ca,cb,cc) tmp_start_time = time.time() while True: if cnt%100 == 0: cur_time = time.time()-tmp_start_time if cur_time >= 1.0: break idx = random.randrange(6) da,db,dc = d[idx] na,nb,nc = da+ca,db+cb,dc+cc if na < 0 or na > NA or nb < 0 or nb > NB or nc < 0 or nc > NC: continue new_score = calc_score(na,nb,nc) d_score = new_score-score temp = T0**(1-cur_time)*T1**cur_time v = d_score/temp v = min(v,1.01) v = max(v,-20) if cur_time >= 0.95: if v >= 0: ca,cb,cc = na,nb,nc score = new_score else: if exp(v) > random.random(): ca,cb,cc = na,nb,nc score = new_score ans = max(ans,score) print(ans)