#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
namespace {
const int N = 5e3 + 5;
int fac[N], ifac[N];
int Add(int a, int b) { return (a += b) >= MOD ? a - MOD : a; }
int Sub(int a, int b) { return (a -= b) < 0 ? a + MOD : a; }
int Mul(int a, int b) { return (long long)a * b % MOD; }
int Pow(int a, int b) {
  int r = 1;
  for (; b; b >>= 1, a = Mul(a, a))
    if (b & 1) r = Mul(r, a);
  return r;
}
void Math_Init() {
  fac[0] = 1;
  for (int i = 1; i < N; ++i) {
    fac[i] = Mul(fac[i - 1], i);
  }
  ifac[N - 1] = Pow(fac[N - 1], MOD - 2);
  for (int i = N - 2; ~i; --i) {
    ifac[i] = Mul(ifac[i + 1], i + 1);
  }
}
}  // namespace
namespace PO {
vector<int> Mul(vector<int> a, vector<int> b) {
  int n = a.size(), m = b.size();
  vector<int> c(n + m - 1);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      c[i + j] = Add(c[i + j], ::Mul(a[i], b[j]));
    }
  }
  return c;
}
}  // namespace PO
vector<int> a;
vector<int> Solve(int l, int r) {
  if (l == r) return vector<int>{a[l], MOD - 1};
  int md = (l + r) >> 1;
  return PO::Mul(Solve(l, md), Solve(md + 1, r));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  Math_Init();
  int n, k;
  cin >> n >> k;
  a.resize(n);
  int all = 1;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    all = Mul(all, a[i]);
  }
  vector<int> A = Solve(0, n - 1);
  int gk = 0, dw = 1, ipw = 1, in = Pow(n, MOD - 2);
  for (int i = 0; i <= min(n, k); ++i) {
    gk = Add(gk, Mul(A[i], Mul(dw, ipw)));
    dw = Mul(dw, k - i);
    ipw = Mul(ipw, in);
  }
  printf("%d\n", Sub(all, gk));
  return 0;
}
