1 #include<iostream>
2 #include<cstdio>
3 #include<cstring>
4 #include<algorithm>
5 using namespace std;
6 long long a,b,c,mn;
7 int n,m;
8 long long ti[100010],bi[100010];
9 long long judge(long long x){
10 long long ret=0;
11 if(a<b){
12 long long tmp1=0,tmp2=0;
13 for(int i=1;i<=m;i++)
14 if(x<bi[i]) tmp1+=bi[i]-x;
15 else if(x>bi[i]) tmp2+=x-bi[i];
16 if(tmp2>=tmp1) ret+=tmp1*a;
17 else ret+=tmp2*a+(tmp1-tmp2)*b;
18 }
19 else for(int i=1;i<=m;i++)
20 if(x<bi[i]) ret+=(bi[i]-x)*b;
21 for(int i=1;i<=n;i++)
22 if(x>ti[i]) ret+=(x-ti[i])*c;
23 return ret;
24 }
25 long long solve(){
26 long long ll=1,rr=100000;
27 while(ll+2<rr){
28 long long mid1=(2*ll+rr)/3,mid2=(ll+2*rr)/3;
29 long long t1=judge(mid1),t2=judge(mid2);
30 if(t1==t2) ll=mid1,rr=mid2;
31 else if(t1<t2) rr=mid2;
32 else ll=mid1;
33 }
34 long long t1=judge(ll),t2=judge(rr),t3=judge((2*ll+rr)/3),t4=judge((ll+2*rr)/3);
35 return min(min(t1,t2),min(t3,t4));
36 }
37 int main(){
38 scanf("%lld%lld%lld",&a,&b,&c);
39 scanf("%d%d",&n,&m);
40 for(int i=1;i<=n;i++) scanf("%lld",&ti[i]);
41 for(int i=1;i<=m;i++) scanf("%lld",&bi[i]);
42 if(c==1e16){
43 mn=1e20;
44 for(int i=1;i<=n;i++) mn=min(mn,ti[i]);
45 printf("%lld\n",judge(mn));
46 return 0;
47 }
48 printf("%lld\n",solve());
49 return 0;
50 }