import sys readline = sys.stdin.readline def Matprod(A, B, mod): N = len(A) temp = [[0] * N for i in range(N)] for i in range(N): for j in range(N): for k in range(N): temp[i][j] += A[i][k] * B[k][j] temp[i][j] %= mod return temp def Matpow(A, M, mod): N = len(A) Mat = [[0] * N for i in range(N)] for i in range(N): Mat[i][i] = 1 for i in range(65): if (M >> i) & 1: Mat = Matprod(Mat, A, mod) A = Matprod(A, A, mod) return Mat N, M, K, p, q = map(int, readline().split()) mod = 10 ** 9 + 7 B = [] for i in range(N): B.append(int(readline())) A = [[q - p, p], [p, q - p]] inv = pow(q, mod - 2, mod) A = Matpow(A, K, mod) ans = A[0][0] * sum(B[:M]) * pow(inv, K, mod) % mod ans += A[0][1] * (sum(B) - sum(B[:M])) * pow(inv, K, mod) % mod ans %= mod print(ans)