#include <bits/stdc++.h>
using namespace std;
long long ksm(long long a, long long x) {
  long long ans = 1, w = a;
  while (x) {
    if (x & 1) ans = ans * w % 1000000007;
    w = w * w % 1000000007;
    x >>= 1;
  }
  return ans;
}
long long n, k, a[5005], f[5005];
signed main() {
  scanf("%lld%lld", &n, &k);
  f[0] = 1;
  for (long long i = 1; i <= n; ++i) {
    scanf("%lld", &a[i]);
    for (long long j = i; j; --j) {
      f[j] = (f[j] * a[i] - f[j - 1] + 1000000007) % 1000000007;
    }
    f[0] = f[0] * a[i] % 1000000007;
  }
  long long res = 0, tmp = 1, inv = ksm(n, 1000000007 - 2);
  for (long long i = 0; i <= n; ++i) {
    res = (res + f[i] * tmp) % 1000000007;
    tmp = tmp * (k - i) % 1000000007 * inv % 1000000007;
  }
  printf("%lld\n", (f[0] - res + 1000000007) % 1000000007);
  return 0;
}
