def prod(arr1,arr2): mod=10**9+7 a1,b1,c1,d1=arr1[0][0],arr1[0][1],arr1[1][0],arr1[1][1] a2,b2,c2,d2=arr2[0][0],arr2[0][1],arr2[1][0],arr2[1][1] ra=a1*a2+b1*c2 ra%=mod rb=a1*b2+b1*d2 rb%=mod rc=c1*a2+d1*c2 rc%=mod rd=c1*b2+d1*d2 rd%=mod return [ra,rb,rc,rd] mod=10**9+7 n,m,k,p,q=map(int,input().split()) arr=[int(input()) for _ in range(n)] bits=format(k,'b') bits=bits[::-1] l=len(bits) mats=[] a=(q-p)*pow(q,mod-2,mod) a%=mod b=p*pow(q,mod-2,mod) b%=mod c=p*pow(q,mod-2,mod) c%=mod d=(q-p)*pow(q,mod-2,mod) d%=mod mats.append([[a,b],[c,d]]) for i in range(l-1): ret=prod(mats[-1],mats[-1]) mats.append([[ret[0],ret[1]],[ret[2],ret[3]]]) coef=[[1,0],[0,1]] for i in range(l): if bits[i]=='0': continue else: ret=prod(coef,mats[i]) coef=[[ret[0],ret[1]],[ret[2],ret[3]]] coef1=coef[0][0] coef2=coef[0][1] ans=0 for i in range(n): if i