#include <bits/stdc++.h>
inline int read() {
  char c = getchar();
  int x = 0, ft = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') ft = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x * ft;
}
const int mod = 1e9 + 7;
inline int fpow(int x, int k) {
  int res = 1;
  for (; k; k >>= 1, x = 1ll * x * x % mod)
    if (k & 1) res = 1ll * res * x % mod;
  return res;
}
int a[5005], f[5005];
int main() {
  int n = read(), k = read(), inv_n = fpow(n, mod - 2), sum = 1, ans = 0;
  f[0] = 1;
  for (int i = 1; i <= n; ++i) {
    int tmp = read();
    sum = 1ll * sum * tmp % mod;
    for (int j = n; j >= 0; --j)
      f[j] = (1ll * tmp * f[j] + mod - f[j - 1]) % mod;
  }
  for (int i = 0, tmp1 = 1, tmp2 = 1; i <= std::min(k, n); ++i) {
    ans = (ans + 1ll * tmp1 * tmp2 % mod * f[i]) % mod;
    tmp1 = 1ll * tmp1 * (k - i) % mod;
    tmp2 = 1ll * tmp2 * inv_n % mod;
  }
  return printf("%d\n", (sum + mod - ans) % mod), 0;
}
