#include <bits/stdc++.h>
int n;
long long mo, a, f[5001], k, ss, ans, m;
long long sqr(long long aa) { return ((aa * aa) % mo); }
long long mi(long long aa, int bb) {
  if (bb == 0) return (1);
  if (bb == 1) return (aa);
  return ((sqr(mi(aa, bb / 2)) * mi(aa, bb % 2)) % mo);
}
int main() {
  scanf("%d%I64d", &n, &k);
  f[0] = 1;
  mo = 1000000007;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a);
    for (int j = i; j >= 1; j--) f[j] = (f[j - 1] * a + f[j]) % mo;
  }
  ss = -1;
  m = mi(n, mo - 2);
  ans = 0;
  for (int i = 0; i <= n - 1; i++) {
    ss = ss * (k - i);
    ss = ss % mo;
    ss = (ss * m) % mo;
    ss = -ss;
    ans = (ans + ss * f[n - i - 1]) % mo;
  }
  ans = (ans + mo) % mo;
  printf("%I64d\n", ans);
}
