# #    ⋀_⋀  #   (・ω・) # ./ U ∽ U\ # │* 合 *│ # │* 格 *│ # │* 祈 *│ # │* 願 *│ # │*   *│ #  ̄ # import sys sys.setrecursionlimit(10**6) input=sys.stdin.readline from math import floor,sqrt,factorial,hypot,log #log2ないyp from heapq import heappop, heappush, heappushpop from collections import Counter,defaultdict,deque from itertools import accumulate,permutations,combinations,product,combinations_with_replacement from bisect import bisect_left,bisect_right from copy import deepcopy from fractions import gcd from random import randint import numpy def ceil(a,b): return (a+b-1)//b inf=float('inf') mod = 10**9+7 def pprint(*A): for a in A: print(*a,sep='\n') def INT_(n): return int(n)-1 def MI(): return map(int,input().split()) def MF(): return map(float, input().split()) def MI_(): return map(INT_,input().split()) def LI(): return list(MI()) def LI_(): return [int(x) - 1 for x in input().split()] def LF(): return list(MF()) def LIN(n:int): return [I() for _ in range(n)] def LLIN(n: int): return [LI() for _ in range(n)] def LLIN_(n: int): return [LI_() for _ in range(n)] def LLI(): return [list(map(int, l.split() )) for l in input()] def I(): return int(input()) def F(): return float(input()) def ST(): return input().replace('\n', '') #mint class ModInt: def __init__(self, x): self.x = x % mod def __str__(self): return str(self.x) __repr__ = __str__ def __add__(self, other): if isinstance(other, ModInt): return ModInt(self.x + other.x) else: return ModInt(self.x + other) __radd__ = __add__ def __sub__(self, other): if isinstance(other, ModInt): return ModInt(self.x - other.x) else: return ModInt(self.x - other) def __rsub__(self, other): if isinstance(other, ModInt): return ModInt(other.x - self.x) else: return ModInt(other - self.x) def __mul__(self, other): if isinstance(other, ModInt): return ModInt(self.x * other.x) else: return ModInt(self.x * other) __rmul__ = __mul__ def __truediv__(self, other): if isinstance(other, ModInt): return ModInt(self.x * pow(other.x, mod-2,mod)) else: return ModInt(self.x * pow(other, mod - 2, mod)) def __rtruediv(self, other): if isinstance(other, self): return ModInt(other * pow(self.x, mod - 2, mod)) else: return ModInt(other.x * pow(self.x, mod - 2, mod)) def __pow__(self, other): if isinstance(other, ModInt): return ModInt(pow(self.x, other.x, mod)) else: return ModInt(pow(self.x, other, mod)) def __rpow__(self, other): if isinstance(other, ModInt): return ModInt(pow(other.x, self.x, mod)) else: return ModInt(pow(other, self.x, mod)) def main(): N,M,K,P,Q=MI() D=LIN(N) tapi = sum(D[:M]) kitchen = sum(D[M:]) P=ModInt(P) Q=ModInt(Q) mat = numpy.matrix([[1-P/Q, P/Q], [P/Q, 1-P/Q]]) mat_k = numpy.linalg.matrix_power(mat, K) vec = [tapi,kitchen] ans = numpy.dot(mat_k,vec) print(ans[0,0]) if __name__ == '__main__': main()