import sys, itertools md = 1000000007 h = (md+1)//2 n, m, k, p, q = map(int, input().split()) bi = sum(map(int, itertools.islice(sys.stdin, m))) bo = sum(map(int, sys.stdin)) print(((bi+bo)+(bi-bo)*pow(2*p*pow(q, -1, md)-1, k, md))*h%md)