import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) n,pa,pb = input().split() n = int(n) pa = float(pa) pb = float(pb) A = list(map(int, input().split())) B = list(map(int, input().split())) A.sort() B.sort() proba = [0]*(1<>i&1==0: l.append(i) used = n - len(l) if len(l)==1: psa = [1] psb = [1] else: psa = [pa] + [(1-pa)/(len(l)-1)] * (len(l)-1) psb = [pb] + [(1-pb)/(len(l)-1)] * (len(l)-1) for ind,i in enumerate(l): vva = psa[ind]*proba[b] vvb = psb[ind]*probb[b] proba[b|(1<bb: ans += (aa+bb) * pa*pb print(ans)