# 行列の乗算(mod) def mat_mul(a, b): I, K, J = len(a), len(b), len(b[0]) c = [[0 for j in range(J)] for i in range(I)] for i in range(I): for k in range(K): for j in range(J): c[i][j] += a[i][k] * b[k][j] c[i][j] %= mod return c # 行列の累乗(mod) def mat_pow(a, n): b = [[0 for j in range(len(a))] for i in range(len(a))] for i in range(len(a)): b[i][i] = 1 while n > 0: if n & 1: b = mat_mul(b, a) a = mat_mul(a, a) n >>= 1 return b n,m,k,p,q = map(int,input().split()) b = [int(input()) for i in range(n)] mod = 10**9+7 ans = 0 #n = 2 st = [[0]*2 for i in range(2)] st[0][0] = q-p st[0][1] = p st[1][0] = p st[1][1] = q-p kk = mat_pow(st,k) bo = pow(q,k,mod) #print(kk) #exit() for i in range(n): if i <= m-1: ans += kk[0][0]*b[i] else: ans += kk[0][1]*b[i] #print(ans,i) #print(ans,16) #exit() m = pow(bo,mod-2,mod) print(ans*m%mod)