#include using namespace std; const int64_t mod = 1000000007; int64_t power(int64_t n, int64_t k) { if (k == 0) return 1; int64_t ans = power(n * n % mod, k / 2); if (k % 2) ans = ans * n % mod; return ans; } int main() { int64_t n, m, k, p, q, s0 = 0, s = 0; cin >> n >> m >> k >> p >> q; for (int i = 0; i < n; i++) { int64_t b; cin >> b; s += b; if (i < m) s0 += b; } s %= mod; s0 %= mod; int64_t shalf = s * ((mod + 1) / 2) % mod, d = (s0 - shalf + mod) % mod; int64_t pq = (2 * mod + 1 - 2 * p * power(q, mod - 2)) % mod; cout << (shalf + d * power(pq, k)) << endl; }