# タピオカ美味しくなーる N, M, K, P, Q = map(int, input().split()) value = [int(input()) for i in range(N)] mod = 10**9 + 7 def rev(X): return pow(X, mod-2, mod) up = 0 down = 2*pow(Q, K, mod) for i in range(N): if i < M: up += value[i]*(pow(Q, K, mod)+pow(Q-2*P, K, mod)) up %= mod else: up += value[i]*(pow(Q, K, mod)-pow(Q-2*P, K, mod)) ans = up*rev(down) % mod print(ans)