#include <bits/stdc++.h>
using namespace std;
inline int gi() {
  int data = 0, m = 1;
  char ch = 0;
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') {
    m = 0;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    data = (data << 1) + (data << 3) + (ch ^ 48);
    ch = getchar();
  }
  return (m) ? data : -data;
}
int n, K, A[100005], f[100005], g[100005], inv[100005], IFac[100005],
    ans[100005], Ans;
inline int Pow(int ts, int js) {
  if (!ts) return 1;
  int al = 1;
  while (js) {
    if (js & 1) al = 1ll * al * ts % 1000000007;
    ts = 1ll * ts * ts % 1000000007;
    js >>= 1;
  }
  return al;
}
int main() {
  n = gi();
  K = gi();
  int pK = K;
  for (int i = 1; i <= n; i++) A[i] = gi();
  f[0] = 1;
  K = min(K, n);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= K + 1; j++) g[j] = 0;
    for (int j = 0; j <= K; j++)
      g[j] = (g[j] + 1ll * f[j] * A[i] % 1000000007) % 1000000007;
    for (int j = 0; j < K; j++)
      g[j + 1] = (g[j + 1] - 1ll * f[j] + 1000000007) % 1000000007;
    for (int j = 0; j <= K; j++) f[j] = g[j];
  }
  memset(f, 0, sizeof(f));
  Ans = 0;
  int Fac = 1, delux = pK;
  for (int i = 0; i <= K; i++) {
    if (i) Fac = 1ll * Fac * delux % 1000000007, delux--;
    Ans = (Ans + 1ll * g[i] * Fac % 1000000007 * Pow(n, pK - i) % 1000000007) %
          1000000007;
  }
  Ans = 1ll * Ans * Pow(Pow(n, pK), 1000000007 - 2) % 1000000007;
  ;
  int Prod = 1;
  for (int i = 1; i <= n; i++) Prod = 1ll * Prod * A[i] % 1000000007;
  cout << (Prod - Ans + 1000000007) % 1000000007 << endl;
  return 0;
}
