#include <bits/stdc++.h>
const int mod = 1000000007;
const int g = 3;
const int max_len = 1 << 18;
const int max_L = 18;
const int max_N = 1000005;
int n, K, a[max_N], rev[max_N], W[max_N];
long long fac[max_N], fac_inv[max_N], inv[max_N];
int read() {
  char c = getchar();
  int ans = 0;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') ans = ans * 10 + c - '0', c = getchar();
  return ans;
}
void Write(int x) {
  if (x < 10)
    putchar(x + '0');
  else
    Write(x / 10), putchar(x % 10 + '0');
}
int min(int x, int y) { return x < y ? x : y; }
int max(int x, int y) { return x > y ? x : y; }
int add(int x, int y) { return (x += y) >= mod ? x - mod : x; }
int sub(int x, int y) { return (x -= y) < 0 ? x + mod : x; }
long long power(long long x, int y, long long ans = 1) {
  for (; y; y >>= 1, x = x * x % mod)
    if (y & 1) ans = ans * x % mod;
  return ans;
}
long long invs(int x) {
  return x == 1 ? 1 : (mod - mod / x) * invs(mod % x) % mod;
}
void prepare() {
  for (int i = fac[0] = 1; i <= max_len; i++) fac[i] = fac[i - 1] * i % mod;
  fac_inv[max_len] = invs(max_len);
  for (int i = max_len; i; i--) fac_inv[i - 1] = fac_inv[i] * i % mod;
  for (int i = 1; i < max_len; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << max_L - 1);
  long long wn = power(g, (mod - 1) / max_len);
  W[max_len / 2] = 1;
  for (int i = max_len / 2 + 1; i < max_len; i++) W[i] = W[i - 1] * wn % mod;
  for (int i = max_len / 2 - 1; i; i--) W[i] = W[i << 1];
}
void NTT(std::vector<int> &A, int len, int L, int flag) {
  static unsigned long long F[max_N], x;
  for (int i = 0, s = max_L - L; i < len; i++) F[rev[i] >> s] = A[i];
  for (int l = 1; l < len; l <<= 1)
    for (int i = 0; i < len; i += l * 2)
      for (int j = 0; j < l; j++)
        x = F[i | j | l] * W[j | l] % mod, F[i | j | l] = F[i | j] + mod - x,
        F[i | j] += x;
  if (flag == 1) {
    A[0] = F[0] % mod * (x = invs(len)) % mod;
    for (int i = 1; i < len; i++) A[i] = F[len - i] % mod * x % mod;
  } else
    for (int i = 0; i < len; i++) A[i] = F[i] % mod;
}
std::vector<int> operator*(std::vector<int> A, std::vector<int> B) {
  int deg = A.size() + B.size() - 1, len = 1, L = 0;
  std::vector<int> C;
  C.resize(deg);
  for (int i = 0; i < A.size(); i++)
    for (int j = 0; j < B.size(); j++)
      C[i + j] = (C[i + j] + (long long)A[i] * B[j]) % mod;
  return C;
}
std::vector<int> cdq_NTT(int ml, int mr) {
  if (ml == mr) return std::vector<int>{a[ml], mod - 1};
  return cdq_NTT(ml, (ml + mr) / 2) * cdq_NTT((ml + mr) / 2 + 1, mr);
}
int main() {
  prepare(), n = read(), K = read();
  int mult = 1;
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++) mult = (long long)mult * a[i] % mod;
  std::vector<int> tmp = cdq_NTT(1, n);
  int res = 0;
  for (int i = 0, prod = 1; i <= min(K, n);
       prod = (long long)prod * (K - i) % mod, i++)
    res = (res + power(n, K - i, prod) * tmp[i]) % mod;
  return Write((mult + mod - res * invs(power(n, K)) % mod) % mod), 0;
}
