#include <bits/stdc++.h>
using namespace std;
const int mod(1e9 + 7);
const int maxn(5005);
inline void Inc(int &x, int y) {
  if ((x += y) >= mod) x -= mod;
}
inline int Pow(long long x, int y) {
  register long long ret = 1;
  for (; y; y >>= 1, x = x * x % mod)
    if (y & 1) ret = ret * x % mod;
  return ret;
}
int f[maxn], n, k, ans;
int main() {
  register int i, j, a, fac, cur;
  scanf("%d%d", &n, &k), f[0] = 1;
  for (i = 1; i <= n; ++i) {
    scanf("%d", &a);
    for (j = i; j; --j) f[j] = 1LL * f[j] * a % mod, Inc(f[j], mod - f[j - 1]);
    f[0] = 1LL * f[0] * a % mod;
  }
  a = Pow(n, 1LL * k * (mod - 2) % (mod - 1)), cur = Pow(n, k - min(n, k));
  for (fac = 1, i = k - min(n, k) + 1; i <= k; ++i) fac = 1LL * fac * i % mod;
  for (i = min(n, k); ~i; --i) {
    Inc(ans, 1LL * f[i] * fac % mod * cur % mod);
    cur = 1LL * cur * n % mod, fac = 1LL * fac * Pow(k - i + 1, mod - 2) % mod;
  }
  ans = 1LL * ans * a % mod, ans = (f[0] - ans + mod) % mod;
  printf("%d\n", ans);
  return 0;
}
