#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long n, m, a[5010], d[5010], c[5010], k;
long long Pow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
int main() {
  scanf("%lld %lld", &n, &k);
  c[0] = 1;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    memset(d, 0, sizeof(d));
    for (long long j = 0; j < i; j++) {
      (d[j] += c[j] * a[i] % mod) %= mod;
      (d[j + 1] -= c[j]) %= mod;
    }
    memcpy(c, d, sizeof(c));
  }
  long long inv = Pow(n, mod - 2), num = 1, ans = 0;
  for (long long i = 0; i <= n; i++) {
    (ans += c[i] * num % mod) %= mod;
    num = num * inv % mod * (k - i) % mod;
  }
  ans = (c[0] - ans) % mod;
  printf("%lld\n", (ans + mod) % mod);
}
