Local authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are n people who plan to move to the cities. The wealth of the i of them is equal to a_{i}. Authorities plan to build two cities, first for n_1 people and second for n_2 people. Of course, each of n candidates can settle in only one of the cities. Thus, first some subset of candidates of size n_1 settle in the first city and then some subset of size n_2 is chosen among the remaining candidates and the move to the second city. All other candidates receive an official refuse and go back home.

To make the statistic of local region look better in the eyes of their bosses, local authorities decided to pick subsets of candidates in such a way that the sum of arithmetic mean of wealth of people in each of the cities is as large as possible. Arithmetic mean of wealth in one city is the sum of wealth a_{i} among all its residents divided by the number of them (n_1 or n_2 depending on the city). The division should be done in real numbers without any rounding.

Please, help authorities find the optimal way to pick residents for two cities.


-----Input-----

The first line of the input contains three integers n, n_1 and n_2 (1 ≤ n, n_1, n_2 ≤ 100 000, n_1 + n_2 ≤ n) — the number of candidates who want to move to the cities, the planned number of residents of the first city and the planned number of residents of the second city.

The second line contains n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 100 000), the i-th of them is equal to the wealth of the i-th candidate.


-----Output-----

Print one real value — the maximum possible sum of arithmetic means of wealth of cities' residents. You answer will be considered correct if its absolute or relative error does not exceed 10^{ - 6}. 

Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if $\frac{|a - b|}{\operatorname{max}(1, b)} \leq 10^{-6}$.


-----Examples-----
Input
2 1 1
1 5

Output
6.00000000

Input
4 2 1
1 4 2 3

Output
6.50000000



-----Note-----

In the first sample, one of the optimal solutions is to move candidate 1 to the first city and candidate 2 to the second.

In the second sample, the optimal solution is to pick candidates 3 and 4 for the first city, and candidate 2 for the second one. Thus we obtain (a_3 + a_4) / 2 + a_2 = (3 + 2) / 2 + 4 = 6.5

Difficulty: interview

Starter code:

Solutions:
from math import *
from sys import *
from queue import *
from decimal import *

n,n1,n2=(int(z) for z in input().split())
s=[int(z) for z in input().split()]
s.sort()
for i in range(n//2):
  s[i],s[n-1-i]=s[n-1-i],s[i]
sum1=0
sum2=0
if n1>n2:
  n1,n2=n2,n1
for i in range(n1):
  sum1+=s[i]
for i in range(n1,n1+n2):
  sum2+=s[i]
print(Decimal(sum1)/Decimal(n1)+Decimal(sum2)/Decimal(n2))

n, n1, n2 = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
if (n2 > n1):
    n1, n2 = n2, n1
sr2 = 0
sr1 = 0
for i in range(n - 1, n - n2 - 1, -1):
    sr2 += a[i]
for i in range(n - n2 - 1, n - n1 - n2 - 1, -1):
    sr1 += a[i]
print(sr1 / n1 + sr2 / n2)
        
        


def main():
    n, n1, n2 = list(map(int, input().split()))
    if n1 > n2:
        n1, n2 = n2, n1
    aa = sorted(map(int, input().split()), reverse=True)
    print(sum(aa[:n1]) / n1 + sum(aa[n1:n1 + n2]) / n2)


def __starting_point():
    main()

__starting_point()

# You lost the game.

n,n1,n2 = list(map(int, input().split()))
L = list(map(int, input().split()))

L.sort(reverse=True)

L1 = L[:n1]
L2 = L[n1:n1+n2]

L3 = L[:n2]
L4 = L[n2:n1+n2]

r1 = sum(L1)/n1 + sum(L2)/n2
r2 = sum(L3)/n2 + sum(L4)/n1

print(max(r1,r2))


n,n1,n2=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
a.sort()
if n1>n2:
    n1,n2=n2,n1
s1=s2=0
for i in range(n-n1,n):
    s2+=a[i]
for i in range(n-n1-n2,n-n1):
    s1+=a[i]
print(s1/n2+s2/n1)


n, n1, n2 = map(int, input().split())
data = list(sorted(map(int, input().split()), reverse = True))
if (n1 > n2):
  n1, n2 = n2, n1
print(sum(data[0:n1])/n1 + sum(data[n1:n1+n2])/n2)

n,n1,n2=map(int,input().split())
l=sorted(list(map(int,input().split())))[::-1]
a=min(n1,n2)
print(sum(l[0:a])/a+sum(l[a:n1+n2])/max(n1,n2))

import math

n, n1, n2 = [int(x) for x in input().split()]
n1, n2 = min(n1, n2), max(n1, n2)
s = [int(x) for x in input().split()]
s.sort()
s.reverse()
s1 = s[:n1]
s2 = s[n1:n1 + n2]
print(sum(s1)/n1 + sum(s2)/n2)    


n,n1,n2=[int(item) for item in input().split()]

a = [int(item) for item in input().split()]

a = sorted(a)
n1,n2 = min(n1,n2),max(n1,n2)
s1 = sum(a[n - n1:])/n1
s2 = sum(a[n - n1 - n2:n - n1])/n2

print(s1+s2)

n,n1,n2 = map(int,input().split())
A = list(map(int,input().split()))
if n1 > n2:
    n2,n1 = n1,n2
A.sort()
sums1 = 0
sums2 = 0
for j in range(n-1, n-1 - n1,-1):
    sums1 += A[j]
for j in range(n-1-n1,n-1-n1-n2,-1):
    sums2 += A[j]
print(sums1/n1 + sums2/n2)

n, n1, n2 = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]

a.sort()

n1, n2 = min(n1, n2), max(n1, n2)

to_consider = a[-n1-n2:]

pa, pb = to_consider[:n2], to_consider[n2:]

print(float(sum(pa)) / len(pa) + float(sum(pb)) / len(pb))


n, n1, n2 = list(map(int, input().split()))
a = sorted(list(map(int, input().split())), reverse = True)

n1, n2 = min(n1,n2), max(n1, n2)

a1 = sum(a[0:n1])/n1
a2 = sum(a[n1:n1 + n2])/n2
print(a1 + a2)



n, n1, n2 = list(map(int, input().split()))
xs = [int(x) for x in input().split()]

xs.sort()
minn = min(n1, n2)
maxn = max(n1, n2)

mean1 = 0
for i in range(minn):
    mean1 += xs[len(xs) - i - 1]
mean1 /= minn

mean2 = 0
for i in range(maxn):
    mean2 += xs[len(xs) - i - 1 - minn]
mean2 /= maxn

print(mean1 + mean2)


n,n1,n2 = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
a = a[n-(n1+n2):]
ans = 0
if n1 > n2:
	ans += sum(a[-n2:])/n2
	ans += sum(a[:-n2])/n1
else:
	ans += sum(a[-n1:])/n1
	ans += sum(a[:-n1])/n2
print("%.7f" %ans)	

'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
def __starting_point():
    main()
'''
#372
#1
'''
def main():
    from sys import stdin,stdout
    n,c=map(int,stdin.readline().split())
    tup=tuple(map(int,stdin.readline().split()))
    counter=1
    for i in range(1,n):
        if tup[i]-tup[i-1]<=c:
            counter+=1
        else:
            counter=1
    stdout.write(str(counter))
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    s=stdin.readline().strip().lower()
    dic={}
    qcounter=0
    for i in 'qwertyuiopasdfghjklzxcvbnm':
        dic[i]=0
    if len(s)<26:
        stdout.write('-1')
    else:
        for i in s:
            if i=='?':
                qcounter+=1
            else:
                dic[i]+=1
        l=[]
        x=list(dic.values()).count(0)
        if qcounter==26 and x==26:
            stdout.write('qwertyuiopasdfghjklzxcvbnm'.upper())
        elif x==0 and qcounter==0:
            stdout.write(s.upper())
        elif qcounter>=x:
            for i in 'qwertyuiopasdfghjklzxcvbnm':
                if dic[i]==0:
                    l.append(i.upper())
            m=len(l)
            i=0
            t=''
            for j in range(len(s)):
                if s[j]=='?':
                    if i>=m:
                        i=0
                    t=t[:j]+l[i]
                    i+=1
                else:
                    t+=s[j].upper()
            stdout.write(t)
        else:
            stdout.write('-1')
def __starting_point():
    main()
'''
#373
#1
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    tup=tuple(map(int,stdin.readline().split()))
    if n==1:
        if tup[0]==0:
            stdout.write('UP')
        elif tup[0]==15:
            stdout.write('DOWN')
        else:
            stdout.write('-1')
    else:
        if tup[-1]-tup[-2]>0:
            if tup[-1]==15:
                stdout.write('DOWN')
            else:
                stdout.write('UP')
        else:
            if tup[-1]==0:
                stdout.write('UP')
            else:
                stdout.write('DOWN')
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    s=stdin.readline().strip()
    rcount=s.count('r')
    bcount=s.count('b')
    #print(rcount,bcount)
    if n&1:
        count=0
        if abs(rcount-bcount)==1:
            if rcount>bcount:
                for i in s[::2]:
                    if i!='r':
                        count+=1
            else:
                for i in s[::2]:
                    if i!='b':
                        count+=1
        else:
            mid=n//2+1
            xtra=max(rcount,bcount)-mid
            if rcount>bcount:
                 for i in s[::2]:
                    if i!='r':
                        count+=1
            else:
                 for i in s[::2]:
                    if i!='b':
                        count+=1
            count+=xtra
    else:
        count=0
        if bcount==rcount:
            if s[0]=='r':
                for i in s[::2]:
                    if i!='r':
                        count+=1
            else:
                for i in s[::2]:
                    if i!='b':
                        count+=1
        else:
            count=abs(bcount-acount)
    stdout.write(str(count))
def __starting_point():
    main()
'''
#3
'''
def main():
    from sys import stdin,stdout
    n,t=map(int,stdin.readline().split())
    s=stdin.readline().strip()
    d=s.index('.')
    p=s
    #print(p,s,d)
    for _ in range(t):
        n=len(s)
        #print(n)
        for i in range(d+1,n):
            #print(i)
            if int(s[i])>=5:
                if i-1==d:
                    t=int(s[i-2])+1
                    s=s[:i-2]+str(t)
                    break
                else:
                    t=int(s[i-1])+1
                    s=s[:i-1]+str(t)
                    break
        if p==s:
            break
        else:
            p=s
    stdout.write(s)
def __starting_point():
    main()
'''
#ENCODE 16.1
#1
'''
def main():
    from sys import stdin,stdout
    for _ in range(int(stdin.readline())):
        s='pikachu'
        t=stdin.readline().strip()
        for i in t:
            if len(s)==0:
                break
            if i in s:
                s=s.replace(i,'')
        if(len(s)):
            stdout.write('NO\n')
        else:
            stdout.write('YES\n')
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    for _ in range(int(stdin.readline())):
        n=int(stdin.readline())
        n=n*(n+1)*(2*n+1)
        n//=6
        stdout.write(str(n)+'\n')
def __starting_point():
    main()
'''
#5
'''
def main():
    def gcd(a,b):
        if b:
            return gcd(b,a%b)
        else:
            return a
    from sys import stdin,stdout
    n,q=map(int,stdin.readline().split())
    tup=tuple(map(int,stdin.readline().split()))
    for _ in range(q):
        c=0
        i=int(stdin.readline())
        if i!=1:
            for k in range(i-1):
                if gcd(tup[k],tup[i-1])!=1:
                    c+=1
        if c:
            stdout.write(str(c)+'\n')
        else:
            stdout.write('-1\n')
def __starting_point():
    main()
'''
#374
#1
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    s=stdin.readline().strip().lower()
    l=[]
    counter=0
    for i in range(n):
        if s[i]=='b':
            counter+=1
        else:
            if counter:
                l.append(counter)
                counter=0
    if counter:
        l.append(counter)
    if len(l):
        stdout.write(str(len(l))+'\n')
        for i in l:
            stdout.write(str(i)+' ')
    else:
        stdout.write('0')
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    n,k=map(int,stdin.readline().split())
    p=[]
    for _ in range(n):
        p.append(stdin.readline().strip())
    p.sort(key=len)
    P=stdin.readline().strip()
    j=0
    count=0
    for i in p:
        j+=1
        if len(i)==len(P):
            count+=1
            minim=count
            break
        else:
            count+=1
            if j%k==0:
                count+=5
    count=0
    j=0
    for i in p:
        j+=1
        if len(i)>len(P):
            if (j-1)%k==0:
                count-=5
            maxim=count
            break
        else:
            if i==p[-1]:
                maxim=count+1
                break
            else:
                count+=1
                #print(count,end=', ')
                if j%k==0:
                    count+=5
                #print(count)
    stdout.write(str(minim)+' '+str(maxim))
def __starting_point():
    main()
'''
#375
#1
'''
def main():
    from sys import stdin,stdout
    x,y,z=map(int,stdin.readline().split())
    minim=min(x,y,z)
    maxim=max(x,y,z)
    minimum=-1
    for i in range(minim,maxim+1):
        if minimum<0:
            minimum=abs(i-x)+abs(i-y)+abs(i-z)
        else:
            minimum=min(minimum,abs(i-x)+abs(i-y)+abs(i-z))
    stdout.write(str(minimum))
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    s=stdin.readline()
    bra=[]
    line=set()
    w=''
    braketflag=False
    for i in s:
        if i=='_':
            if w!='':
                if not braketflag:
                    line.add(w)
                else:
                    bra.append(w)
            w=''
        elif i=='(':
            braketflag=True
            if w!='':
                line.add(w)
            w=''
        elif i==')':
            braketflag=False
            if w!='':
                bra.append(w)
            w=''
        elif i=='\n':
            if w!='':
                line.add(w)
        else:
            w+=i
    maxi=0
    for i in line:
        maxi=max(maxi,len(i))
    stdout.write(str(maxi)+' '+str(len(bra)))
def __starting_point():
    main()
'''
'''
#3
def main():
    from sys import stdin,stdout
    n,m=map(int,stdin.readline().split())
    l=list(map(int,stdin.readline().split()))
    dic={}
    for j in range(1,m+1):
        dic[j]=0
    for i in l:
        if i in dic.keys():
            dic[i]+=1
        else:
            dic[i]=1
    eq=n//m
    c=0
    for j in range(1,m+1):
        if dic[j]<eq:
            break
    i=0
    while i<n:
        if l[i]>m:
            if dic[j]<eq:
                l[i]=j
                dic[j]+=1
                c+=1
                i+=1
            else:
                j+=1
                if j>m:
                    break
        else:
            i+=1
    flag=True
    for j in range(1,m+1):
        if dic[j]<eq:
            flag=False
            break
    if flag:
        stdout.write(str(eq)+' '+str(c)+'\n')
        for i in l:
            stdout.write(str(i)+' ')
    else:
        i=0
        while(i<n):
            if dic[l[i]]>eq:
                if j<=m and dic[j]<eq:
                    l[i]=j
                    dic[j]+=1
                    c+=1
                elif j<=m:
                    j+=1
                else:
                    break
            i+=1
        stdout.write(str(eq)+' '+str(c)+'\n')
        for i in l:
            stdout.write(str(i)+' ')
def __starting_point():
    main()
'''
#377
#1
'''
def main():
    from sys import stdin,stdout
    k,r=map(int,stdin.readline().split())
    rem=k%10
    if rem:
        if rem==r:
            stdout.write('1')
        else:
            if rem ==5:
                a=2
            elif rem == 2:
                a=5
            else:
                a=11
            for i in range(1,10):
                if (rem*i) %10==r:
                    break
            stdout.write(str(min(a,i)))
    else:
        stdout.write('0')
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    n,k=map(int,stdin.readline().split())
    t=tuple(map(int,stdin.readline().split()))
    l=[]
    c=0
    l+=[t[0]]
    for i in range(1,n):
        s=l[i-1]+t[i]
        if s<k:
            c+=(k-s)
            l.append(t[i]+(k-s))
        else:
            l.append(t[i])
    stdout.write(str(c)+'\n')
    for i in l:
        stdout.write(str(i)+' ')
def __starting_point():
    main()
'''
#1
'''
def main():
    from sys import stdin,stdout
    for _ in range(int(stdin.readline())):
        m1,m2,m3=map(int,stdin.readline().split())
        o1,o2,o3=map(int,stdin.readline().split())
        p1,p2,p3=map(int,stdin.readline().split())
        t=(sum((m1,m2,m3)),sum((o1,o2,o3)),sum((p1,p2,p3)),sum((m1,o1,p1)),sum((m2,o2,p2)),sum((m3,o3,p3)))
        s=max(filter(lambda x: x&1 ,t))
        stdout.write(str(s)+'\n')
def __starting_point():
    main()
'''
#378
#1
'''
def main():
    from sys import stdin,stdout
    s=stdin.readline().lower()
    maxjump=0
    j=1
    for i in s:
        if i=='a' or i=='e' or i=='i' or i=='o' or i=='u' or i=='y' or i=='\n':
            maxjump=max(maxjump,j)
            j=1
        else:
            j+=1
    stdout.write(str(maxjump))
def __starting_point():
    main()
'''
#2
'''
def main():
    from sys import stdin,stdout
    c=[]
    for _ in range(int(stdin.readline())):
        l,r=map(int,stdin.readline().split())
        c.append(l-r)
    flag=1
    for i in c:
        if i<0:
            flag=0
            break
    if flag:
        stdout.write('0')
    else:
        flag=2
        for i in c:
            if i>0:
                flag=0
                break
        if flag:
            stdout.write('0')
        else:
            index=1
            csum=sum(c)
            msum=csum
            for i in range(len(c)):
                nsum=abs(csum-c[i]*(-2))
                if nsum > msum:
                    index=i+1
                    msum=nsum
            stdout.write(str(index))
def __starting_point():
    main()
'''
#NOVEMBER LONG 2016
#ALEXTASK
'''
def main():
    from sys import stdin,stdout
    from fractions import gcd
    for _ in range(int(stdin.readline())):
        n=int(stdin.readline())
        tup=tuple(map(int,stdin.readline().split()))
        lcm=(tup[0]*tup[1])//gcd(tup[0],tup[1])
        for x in range(len(tup)):
            for y in range(len(tup)):
                if y>x:
                    lcm=min(lcm,(tup[x]*tup[y])//gcd(tup[x],tup[y]))
        stdout.write(str(lcm)+'\n')
def __starting_point():
    main()
'''
#CPERM
'''
def main():
    from sys import stdin,stdout
    MOD=int(1e9)+7
    def power(a,b):
        if b==0:
            return 1
        if b & 1:
            return (a*power(a,b-1))%MOD
        else:
            return power((a*a)%MOD,b>>1)%MOD
    for _ in range(int(stdin.readline())):
        n=int(stdin.readline())
        n-=2
        if n>0:
            n=((power(2,n)-1)%MOD<<1)%MOD
        else:
            n=0
        stdout.write(str(n)+'\n')
def __starting_point():
    main()
'''
#CHSQR
'''
def main():
    from sys import stdin,stdout
    for _ in range(int(stdin.readline())):
        n=int(stdin.readline())
        #arr=list(list(0 for x in range(n)) for x in range(n))
        l=[]
        i=0
        j=2
        while i<n-1:
            if j > n:
                j=n-2
            l.append(n-j)
            if j&1:
                j-=2
            else:
                j+=2
            i+=1
        l+=([n]+l)
        #print(l)
        for i in range(n):
            for j in range(n):
                stdout.write(str(l[i+j])+' ')
            stdout.write('\n')
def __starting_point():
    main()
'''
#URBANDEV
'''
def main():
    from sys import stdin,stdout
    h=[]
    v=[]
    order=[]
    n=int(stdin.readline())
    for i in range(n):
        a,b,x,y=map(int,stdin.readline().split())
        if a-x:
            h.append((min(a,x),max(a,x),y))
            order.append(1)
        else:
            v.append((min(y,b),max(y,b),x))
            order.append(0)
    #print(l,r)
    hd=list(0 for x in range(len(h)))
    vd=list(0 for x in range(len(v)))
    lightcounter=0
    for i in range(len(v)):
        for j in range(len(h)):
            y=h[j][2]
            x=v[i][2]
            miny=v[i][0]
            maxy=v[i][1]
            minx=h[j][0]
            maxx=h[j][1]
            if y>miny and y<maxy and x>minx and x<maxx:
                lightcounter+=1
                hd[j]+=1
                vd[i]+=1
            elif x==minx:
                if y>miny and y<maxy:
                    lightcounter+=1
                    hd[j]+=1
                    vd[i]+=1
            elif x==maxx:
                if y>miny and y<maxy:
                    lightcounter+=1
                    hd[j]+=1
                    vd[i]+=1
            elif miny==y:
                if x>minx and x<maxx:
                    lightcounter+=1
                    hd[j]+=1
                    vd[i]+=1
            elif maxy==y:
                if x>minx and x<maxx:
                    lightcounter+=1
                    hd[j]+=1
                    vd[i]+=1
    stdout.write(str(lightcounter)+'\n')
    for i in range(n):
        if order[i]:
            stdout.write(str(hd[0])+' ')
            hd=hd[1:]
        else:
            stdout.write(str(vd[0])+' ')
            vd=vd[1:]
def __starting_point():
    main()
'''
#FRIEMEET
'''
from collections import *
class Graph:
    def __init__(self):
        self.nodes = set()
        self.edges = defaultdict(list)
        self.distances = {}

    def add_node(self, value):
        self.nodes.add(value)

    def add_edge(self, from_node, to_node, distance):
        self.edges[from_node].append(to_node)
        self.edges[to_node].append(from_node)
        self.distances[(from_node, to_node)] = distance
        self.distances[(to_node, from_node)] = distance


def dijsktra(graph, initial):
    visited = {initial: 0}
    path = {}

    nodes = set(graph.nodes)

    while nodes: 
        min_node = None
        for node in nodes:
            if node in visited:
                if min_node is None:
                    min_node = node
                elif visited[node] < visited[min_node]:
                    min_node = node

        if min_node is None:
            break

        nodes.remove(min_node)
        current_weight = visited[min_node]

        for edge in graph.edges[min_node]:
            weight = current_weight + graph.distances[(min_node, edge)]
            if edge not in visited or weight < visited[edge]:
                visited[edge] = weight
                path[edge] = min_node

    return visited, path

def main():
    from sys import stdin,stdout
    from fractions import Fraction
    for _ in range(int(stdin.readline())):
        G=Graph()
        n,m=map(int,stdin.readline().split())
        for x in range(1,n+1):
            G.add_node(x)
        for _ in range(n-1):
            a,b,l=map(int,stdin.readline().split())
            G.add_edge(a,b,l)
        l=tuple(map(int,stdin.readline().split()))
        ksum=0
        for i in range(len(l)-1):
            d,p=dijsktra(G,l[i])
            for j in range(i+1,len(l)):
                ksum+=d[l[j]]*2
        ans=Fraction(ksum,m*m)
        stdout.write(str(ans.numerator)+' '+str(ans.denominator)+'\n')
def __starting_point():
    main()
'''
#734A
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    s=stdin.readline().strip()
    dcount=s.count('D')
    acount=s.count('A')
    if dcount>acount:
        stdout.write('Danik')
    elif dcount<acount:
        stdout.write('Anton')
    else:
        stdout.write('Friendship')
def __starting_point():
    main()
'''
#734B
'''
def main():
    from sys import stdin,stdout
    a,b,c,d=map(int,stdin.readline().split())
    min256=min(a,c,d)
    ksum=256*min256
    a-=min256
    min32=min(a,b)
    ksum+=min32*32
    stdout.write(str(ksum))
def __starting_point():
    main()
'''
#381
#A
'''
def main():
    from sys import stdin,stdout
    n,a,b,c=map(int,stdin.readline().split())
    rem=n%4
    if rem:
        if rem & 1:
            if rem==1:
                minim=min((3*a,c,b+a))
                stdout.write(str(minim))
            else:
                minim=min(a,c+b)
                stdout.write(str(minim))
        else:
            minim=min((b,2*a,2*c))
            stdout.write(str(minim))
    else:
        stdout.write('0')
def __starting_point():
    main()
'''
#B
'''
def main():
    from sys import stdin,stdout
    n,m=map(int,stdin.readline().split())
    t=tuple(map(int,stdin.readline().split()))
    maxim=0
    for i in range(m):
        l,r=map(int,stdin.readline().split())
        s=sum(t[l-1:r])
        if s>0:
            maxim+=s
    stdout.write(str(maxim))
def __starting_point():
    main()
'''
#C
'''
def main():
    from sys import stdin,stdout
    n,m=map(int,stdin.readline().split())
    minim=n
    a=list(n for x in range(n))
    #print(a)
    for i in range(m):
        l,r=map(int,stdin.readline().split())
        if r-l < minim:
            minim=r-l
            minimpair=(l-1,r)
    a[minimpair[0]:minimpair[1]]=list(i for i in range(minim+1))
    stdout.write(str(minim+1)+'\n')
    for i in a:
        stdout.write(str(i)+' ')
def __starting_point():
    main()
'''
'''
#L42
#1
def main():
    from sys import stdin,stdout
    for _ in range(int(stdin.readline())):
        s=stdin.readline().strip()
        t=''
        for i in s:
            if i=='<':
                t+='>'
            elif i=='>':
                t+='<'
            else:
                t+=i
        stdout.write(str(t.count('><'))+'\n')
def __starting_point():
    main()
'''
#382
#1
'''
def main():
    from sys import stdin,stdout
    n,k=map(int,stdin.readline().split())
    s=stdin.readline().strip()
    g=s.index('G')
    t=s.index('T')
    if abs(t-g)%k:
        stdout.write('NO')
    else:
        minim=min(t,g)
        maxim=max(t,g)
        flag=1
        while minim<maxim:
            if s[minim]=='#':
                flag=0
                break
            minim+=k
        if flag:
            stdout.write('YES')
        else:
            stdout.write('NO')
def __starting_point():
    main()
'''
#2
def main():
    from sys import stdin,stdout
    import collections
    n,n1,n2=list(map(int,stdin.readline().split()))
    a=sorted(map(int,stdin.readline().split()),reverse=True)
    minim=min(n1,n2)
    maxim=max(n1,n2)
    ans=sum(a[:minim])/minim
    #print(ans)
    ans+=sum(a[minim:minim+maxim])/maxim
    #print(ans)
    stdout.write('{:.6f}'.format(ans))
def __starting_point():
    main()

__starting_point()

from sys import stdin

n, n1, n2 = list(map(int, stdin.readline().split()))

a = sorted(map(int, stdin.readline().split()), key=lambda x: -x)

mn = min(n1, n2)
mx = max(n1, n2)

# print(mn, mx)
# print(a)
# print(sum(a[:mn]) / mn, sum(a[mn:mn+mx]) / mx)
print((sum(a[:mn]) / mn) + (sum(a[mn:mn+mx]) / mx))


n, n1, n2 = map(int, input().split())
a = sorted(list(map(int, input().split())))
ans = 0.0
s = 0.0
for i in range(min(n1, n2)):
    s += a[n - 1 - i]
s /= min(n1, n2)
ans += s
s = 0.0
for i in range(min(n1, n2), min(n1, n2) + max(n1, n2)):
    s += a[n - 1 - i]
s /= max(n1, n2)
ans += s
print(ans)

n, n1, n2 = input().split()
avg = 0
n, n1, n2 = [int(n), int(n1), int(n2)]
a = [int(x) for x in input().split()]
a.sort()
a.reverse()
if n1>=n2:
    avg = (sum(a[:n2])/ len(a[:n2])) + (sum(a[n2:n1+n2])/ len(a[n2:n1+n2]))
elif n2>n1:
    avg = (sum(a[:n1])/ len(a[:n1])) + (sum(a[n1:n1+n2])/ len(a[n1:n1+n2]))
print(format(avg, '.8f'))

n, n1, n2 = map(int, input().split())
p = list(map(int, input().split()))
n1, n2 = min(n1, n2), max(n1, n2)
p.sort(reverse=True)
res1 = 0
res2 = 0
#print(p)
for i in range(n1 + n2):
    if i < n1:
        res1 += p[i]
    else:
        res2 += p[i]
#print(res1, res2)
print(res1/n1 + res2/n2)

n, n1, n2 = list(map(int, input().split()))

line = list(map(int, input().split()))

line.sort(reverse=True)

mi = min(n1,n2)
ma = max(n1,n2)

i = 0
minSum = 0
maxSum = 0
for x in range(mi):
    minSum = minSum + line[i]
    i = i + 1

for x in range(ma):
    maxSum = maxSum + line[i]
    i = i + 1
    
print((minSum / mi) + (maxSum / ma))


n, n1, n2 = list(map(int, input().split()))
values = sorted(map(int, input().split()), key=lambda x: -x)

if n1 > n2:
    n1, n2 = n2, n1

g1 = values[:n1]
g2 = values[n1:n1+n2]

print(sum(g1) / n1 + sum(g2) / n2)


import math,sys,re,itertools,pprint,collections,copy
rs,ri,rai,raf=input,lambda:int(input()),lambda:list(map(int, input().split())),lambda:list(map(float, input().split()))

n, n1, n2 = rai()
a = rai()
a.sort(reverse=True)

if n1 < n2:
    print(sum(a[:n1])/n1 + sum(a[n1:n1+n2])/n2)
else:
    print(sum(a[:n2])/n2 + sum(a[n2:n2 + n1])/n1)


from sys import stdin, stdout
n, n1, n2 = map(int, stdin.readline().split())
numbers = sorted(list(map(int, stdin.readline().split())))[::-1][:n1 + n2][::-1]


ans = 0
if n1 > n2:
    ans += sum(numbers[:n1]) / n1 + sum(numbers[::-1][:n2]) / n2
else:
    ans += sum(numbers[:n2]) / n2 + sum(numbers[::-1][:n1]) / n1

stdout.write(str(ans))