#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 100010, mod = 1e9 + 7;
int n, d, a, b, m[N], ans;
signed main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
freopen("Milk.in", "r", stdin);
freopen("Milk.out", "w", stdout);
cin >> n >> d >> a >> b;
for (int i = 1; i <= n; i++) cin >> m[i];
sort(m + 1, m + 1 + n, greater<int>());
for (int i = 1; i <= a; i++) m[i] += d;
for (int i = 1; i <= d; i++) {
sort(m + 1, m + 1 + n, greater<int>());
for (int i = 1; i <= b; i++) m[i]--;
}
for (int i = 1; i <= n; i++) ans = (ans + m[i] % mod * m[i] % mod) % mod;
cout << ans % mod;
return 0;
}