#include <bits/stdc++.h>
using namespace std;
using LL = long long;
namespace _buff {
const size_t BUFF = 1 << 19;
char ibuf[BUFF], *ib = ibuf, *ie = ibuf;
char getc() {
  if (ib == ie) {
    ib = ibuf;
    ie = ibuf + fread(ibuf, 1, BUFF, stdin);
  }
  return ib == ie ? -1 : *ib++;
}
}  // namespace _buff
LL read() {
  using namespace _buff;
  LL ret = 0;
  bool pos = true;
  char c = getc();
  for (; (c < '0' || c > '9') && c != '-'; c = getc()) {
    assert(~c);
  }
  if (c == '-') {
    pos = false;
    c = getc();
  }
  for (; c >= '0' && c <= '9'; c = getc()) {
    ret = (ret << 3) + (ret << 1) + (c ^ 48);
  }
  return pos ? ret : -ret;
}
const int MOD = 1e9 + 7;
void iadd(int &dp, const int &val) {
  dp += val;
  if (dp >= MOD) {
    dp -= MOD;
  }
}
void ladd(int &dp, const LL &val) { dp = (dp + val) % MOD; }
int qpow(int base, int e) {
  int ret = 1;
  for (; e; e >>= 1) {
    if (e & 1) {
      ret = (LL)ret * base % MOD;
    }
    base = (LL)base * base % MOD;
  }
  return ret;
}
int main() {
  int n = read(), k = read();
  int inv_n = qpow(n, MOD - 2);
  int ans = 1;
  vector<vector<int> > dp(n + 1, vector<int>(n + 1));
  dp[0][0] = 1;
  for (int i = 0; i < n; ++i) {
    int a = read();
    ans = (LL)ans * a % MOD;
    for (int j = 0; j <= i; ++j) {
      ladd(dp[i + 1][j + 1], (LL)dp[i][j] * (MOD - inv_n));
      ladd(dp[i + 1][j], (LL)dp[i][j] * a);
    }
  }
  int mul = 1;
  for (int i = 0; i <= n && i <= k; ++i) {
    iadd(ans, MOD - (LL)mul * dp[n][i] % MOD);
    mul = (LL)mul * (k - i) % MOD;
  }
  cout << ans;
  return 0;
}
