#include <bits/stdc++.h>
using namespace std;
inline int M(int x) { return x >= 1000000007 ? x - 1000000007 : x; }
inline int M1(int x) { return x < 0 ? x + 1000000007 : x; }
int n, m, a[5127], f[5127], g[5127], f1[5127];
inline int ksm(int p, int k) {
  int res = 1;
  while (k) {
    if (k & 1) res = 1ll * res * p % 1000000007;
    p = 1ll * p * p % 1000000007;
    k >>= 1;
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  int i, j, res = 1, len = 1, ans = 0, ans1 = 1, In;
  for (i = 1; i <= n; i++)
    scanf("%d", &a[i]), ans1 = 1ll * ans1 * a[i] % 1000000007;
  f[0] = 1;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= len; j++) g[j] = M(1000000007 - f[j - 1]);
    g[0] = 0;
    for (j = 0; j < len; j++) g[j] = M(g[j] + 1ll * a[i] * f[j] % 1000000007);
    ++len;
    for (j = 0; j < len; j++) f[j] = g[j];
  }
  In = ksm(n, 1000000007 - 2);
  for (i = 0; i <= min(n, m); i++) {
    ans = M(ans + 1ll * f[i] * res % 1000000007);
    res = 1ll * res * In % 1000000007 * (m - i) % 1000000007;
  }
  printf("%d", M1(ans1 - ans));
  return 0;
}
