N,M,K,p,q = map(int,input().split()) b = [int(input()) for _ in range(N)] P = 10 ** 9 + 7 r = p * pow(q,P-2,P) % P R = [[1-r,r],[r,1-r]] e = [[1,0],[0,1]] def seki(x,y): l = [[0] * 2 for _ in range(2)] for i in range(2): for j in range(2): for k in range(2): l[i][j] += x[i][k] * y[k][j] % P l[i][j] %= P return l while K: if K & 1: e = seki(e,R) R = seki(R,R) K >>= 1 s = sum(b[:M]) t = sum(b) - s ans = e[0][0] * s + e[0][1] * t print(ans %P)