#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
inline int read() {
  int w = 1, s = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return w * s;
}
inline long long ksm(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    y >>= 1;
    x = x * x % mod;
  }
  return res;
}
int a[101000], n, k, f[5050][5050], fac[10010], Ifac[10100];
inline int add(int a, int b) {
  a += b;
  return a >= mod ? a - mod : a;
}
inline long long Calc(int a, int b) {
  long long ret = 1;
  for (register int i = 0; i < b; ++i) ret = 1ll * ret * (a - i) % mod;
  return (ret % mod + mod) % mod;
}
int main() {
  n = read(), k = read();
  long long ans = 1;
  for (register int i = 1; i <= n; ++i) a[i] = read(), ans = ans * a[i] % mod;
  f[0][0] = 1;
  for (register int i = 0; i < n; ++i) {
    for (register int j = 0; j <= i; ++j) {
      if (!f[i][j]) continue;
      f[i + 1][j + 1] = add(mod - f[i][j], f[i + 1][j + 1]);
      f[i + 1][j] = add(1ll * a[i + 1] * f[i][j] % mod, f[i + 1][j]);
    }
  }
  long long res = 0;
  for (register int i = 0; i <= n; ++i) {
    res += 1ll * f[n][i] * ksm(ksm(n, mod - 2), i) % mod * Calc(k, i) % mod;
    res %= mod;
  }
  cout << (ans - res + mod) % mod;
  return 0;
}
