#include using namespace std; #define int long long #define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)x.size()) template bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } template using V = vector; using P = pair; /* * */ const int mod = 1e9+7; int mpow(int a, int b) { if(b == 0) return 1; return mpow(a*a%mod, b/2)*(b%2?a:1)%mod; } int e[42][2]; signed main() { int n, m, k, p, q; cin >> n >> m >> k >> p >> q; V b(n); rep(i, 0, n) cin >> b[i]; e[0][0] = p*mpow(q, mod-2)%mod; e[0][1] = (1-p*mpow(q, mod-2)%mod+mod)%mod; rep(i, 1, 42){ int x = e[i-1][0]; int y = e[i-1][1]; e[i][0] = (x*x%mod + y*y%mod)%mod; e[i][1] = 2*x*y%mod; // cout << x << " -:- " << y << endl; } V cnt(2, -1); int i = 0; while(k){ if(k%2){ int x = e[i][0]; int y = e[i][1]; if(cnt[0] == -1){ cnt[0] = x; cnt[1] = y; }else{ int t = cnt[0]; int s = cnt[1]; cnt[0] = (x*t%mod + y*s%mod)%mod; cnt[1] = (x*s%mod + y*t%mod)%mod; // cout << x*t%mod << endl; // cout << x*s%mod << endl; // cout << y*t%mod << endl; // cout << y*s%mod << endl; // cout << x << ":" << y << " "; // cout << cnt[0] << " --- " << cnt[1] << endl; } } k /= 2; i++; } V sum(2); rep(i, 0, m) sum[0] += b[i]; rep(i, m, n) sum[1] += b[i]; int ans = 0; (ans += sum[0]*cnt[0]%mod) %= mod; (ans += sum[1]*cnt[1]%mod) %= mod; cout << ans << endl; // cout << (ans*4%mod) << endl; // cout << cnt[0] << " - " << cnt[1] << endl; // cout << sum[0] << " - " << sum[1] << endl; return 0; }