import java.io.BufferedReader; import java.io.InputStreamReader; import java.math.BigInteger; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int m = Integer.parseInt(sa[1]); long k = Long.parseLong(sa[2]); int p = Integer.parseInt(sa[3]); int q = Integer.parseInt(sa[4]); int[] b = new int[n]; for (int i = 0; i < b.length; i++) { b[i] = Integer.parseInt(br.readLine()); } br.close(); int mod = 1000000007; long sum1 = 0; for (int i = 0; i < m; i++) { sum1 += b[i]; } sum1 %= mod; long sum2 = 0; for (int i = m; i < n; i++) { sum2 += b[i]; } sum2 %= mod; long[][] dp = new long[2][50]; dp[0][0] = q - p; dp[1][0] = p; long[] pow = new long[50]; pow[0] = q; for (int i = 1; i < 50; i++) { dp[0][i] = dp[0][i - 1] * dp[0][i - 1] + dp[1][i - 1] * dp[1][i - 1]; dp[0][i] %= mod; dp[1][i] = dp[0][i - 1] * dp[1][i - 1] + dp[1][i - 1] * dp[0][i - 1]; dp[1][i] %= mod; pow[i] = pow[i - 1] * pow[i - 1] % mod; } long stay = 0; long not = 0; long total = 0; if (k == 0) { stay = q - p; not = p; total = q; } else { long k2 = k; boolean first = true; for (int i = 48; i >= 0; i--) { long d = 1L << i; long e = k2 / d; k2 %= d; if (e > 0 && first) { stay = dp[0][i]; not = dp[1][i]; total = pow[i]; first = false; continue; } if (e > 0) { long bk = stay; stay = stay * dp[0][i] + not * dp[1][i]; stay %= mod; not = bk * dp[1][i] + not * dp[0][i]; not %= mod; total = total * pow[i]; total %= mod; } } } long t2 = BigInteger.valueOf(total).modInverse(BigInteger.valueOf(mod)).longValue(); long ans = stay * sum1 % mod + (total - stay + mod) % mod * sum2 % mod; ans %= mod; ans = ans * t2 % mod; System.out.println(ans); } }