#include using namespace std; using ll = long long; using ld = long double; using P = pair; using Vec = vector; template using Vec1 = vector; template using Vec2 = vector >; #define all(s) (s).begin(), (s).end() #define pb push_back #define mp make_pair #define fs first #define sc second template bool chmax(T &a, const T b){if(a < b){a = b; return true;} return false;} template bool chmin(T &a, const T b){if(a > b){a = b; return true;} return false;} template ll pow2(const T n){return (1LL << n);} void sonic(){ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);} void setp(const ll n){cout << fixed << setprecision(n);} const ll INF = 1e9+1; const ll LINF = 1e18+1; const ll MOD = 1e9+7; //const ll MOD = 998244353; const ld PI = acos(-1); const ld EPS = 1e-11; ll PowMod(ll a, ll n){ if(a < 0) a = (a%MOD+MOD)%MOD; if(n == 1) return a; if(n%2 == 0) return PowMod(a*a%MOD, n/2); return a*PowMod(a*a%MOD, n/2)%MOD; } ll inv(ll n){ return PowMod(n, MOD-2); } int main(void){ ll n, m, k, p, q; cin >> n >> m >> k >> p >> q; Vec b(n); for(ll i = 0; i < n; i++) cin >> b[i]; ll x = PowMod(q, k), y = PowMod(q-2*p, k); ll c = (x+y)*inv(2)%MOD*inv(x)%MOD; ll d = (x-y+MOD)%MOD*inv(2)%MOD*inv(x)%MOD; ll ans = 0; for(ll i = 0; i < n; i++){ if(i < m) ans += b[i]*c; else ans += b[i]*d; ans %= MOD; } cout << ans << endl; return 0; }