#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 5e3 + 9;
int n, k;
long long a[N], c[2][N];
long long qpow(long long x, long long y) {
  long long t = 1;
  while (y) {
    if (y & 1) (t *= x) %= mod;
    y >>= 1, (x *= x) %= mod;
  }
  return t;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  c[0][0] = 1;
  long long sum = 1;
  for (int i = 1; i <= n; i++) {
    int V = i & 1;
    memset(c[V], 0, sizeof(c[V]));
    for (int j = 0; j < n; j++)
      c[V][j + 1] = ((c[V][j + 1] - c[V ^ 1][j]) % mod + mod) % mod;
    for (int j = 0; j <= n; j++) (c[V][j] += c[V ^ 1][j] * a[i] % mod) %= mod;
    (sum *= a[i]) %= mod;
  }
  int p = n & 1;
  long long ans = 0, mi = 1;
  for (int i = 0; i <= n; i++) {
    (ans += c[p][i] * mi % mod * qpow(qpow(n, i), mod - 2) % mod) %= mod;
    (mi *= (long long)(k - i)) %= mod;
  }
  printf("%lld\n", ((sum - ans) % mod + mod) % mod);
  return 0;
}
