#include <bits/stdc++.h>
using namespace std;
const int N = 5010, mod = 1000000007;
int ksm(long long a, int b, int c = 1) {
  for (; b; b /= 2, a = a * a % mod)
    if (b & 1) c = c * a % mod;
  return c;
}
int f[N], g[N], n, K, ans;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> K;
  f[0] = 1;
  for (int i = 1; i <= n; ++i) {
    int t;
    cin >> t;
    for (int j = i; j >= 0; --j) {
      g[j] = (f[j] + (long long)g[j] * t + mod - (j ? g[j - 1] : 0)) % mod;
      f[j] = ((long long)f[j] * t + mod - (j ? f[j - 1] : 0)) % mod;
    }
  }
  for (int j = 0, pw = K; j <= n && j < K; pw = (long long)pw * (K - ++j) % mod)
    ans = (ans + ksm(n, mod - 2 - j,
                     ksm(j + 1, mod - 2, (long long)g[j] * pw % mod))) %
          mod;
  cout << ans << '\n';
  return 0;
}
