#include <bits/stdc++.h>
using namespace std;
const int _ = 1e2;
const int maxn = 5e3 + _;
const int mod = 1e9 + 7;
inline int ad(int x, int y) { return x >= mod - y ? x - mod + y : x + y; }
inline int re(int x, int y) { return x < y ? x - y + mod : x - y; }
inline int mu(int x, int y) { return (long long)x * y % mod; }
inline int qp(int x, long long y) {
  int r = 1;
  while (y) {
    if (y & 1) r = mu(r, x);
    x = mu(x, x);
    y >>= 1;
  }
  return r;
}
inline int iv(int x) { return qp(x, mod - 2); }
int a[maxn], f[maxn][maxn];
int main() {
  int n, K, s = 1;
  scanf("%d%d", &n, &K);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), s = mu(s, a[i]);
  f[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= i; j++) {
      if (f[i - 1][j] != 0) f[i][j] = ad(f[i][j], mu(f[i - 1][j], a[i]));
      if (j && f[i - 1][j - 1] != 0)
        f[i][j] = ad(f[i][j], re(0, f[i - 1][j - 1]));
    }
  }
  int ans = 0, g = 1;
  for (int i = 0; i <= n; g = mu(g, K - i), i++)
    ans = ad(ans, mu(iv(qp(n, i)), mu(g, f[n][i])));
  printf("%d\n", re(s, ans));
  return 0;
}
