#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
const int MAXN = 100010;
const int INF = 1e9;
const long long Mod = 1e9 + 7;
int N;
int a[MAXN + 1];
inline void Add(long long &a, long long b) {
  a = (a + b >= Mod ? a + b - Mod : a + b);
}
inline long long Pow(long long a, long long b) {
  long long ret = 1;
  for (; b; b >>= 1, a = a * a % Mod)
    if (b & 1) ret = ret * a % Mod;
  return ret;
}
long long f[5010][5010], K;
int main() {
  N = read();
  K = read();
  long long ml = 1;
  for (int i = 1; i <= N; i++) a[i] = read(), ml = ml * a[i] % Mod;
  f[0][0] = 1;
  for (int i = 1; i <= N; i++) {
    for (int j = 0; j <= i; j++) {
      if (j) Add(f[i][j], Mod - f[i - 1][j - 1]);
      Add(f[i][j], f[i - 1][j] * a[i] % Mod);
    }
  }
  long long fac = 1, ans = 0;
  long long Inv_n = Pow(N, Mod - 2);
  for (int i = 0; i <= N && i <= K; i++) {
    Add(ans, fac * Pow(Inv_n, i) % Mod * f[N][i] % Mod);
    fac = fac * (K - i) % Mod;
  }
  printf("%lld\n", (ml - ans + Mod) % Mod);
  return 0;
}
