#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int mod = 1e9 + 7;
int n, k;
int poly[N], fac[N];
template <typename T>
inline void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
inline void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
inline void read(T &x) {
  T f = 1;
  x = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + c - '0';
  x *= f;
}
inline void inc(int &x, int y) { x = x + y < mod ? x + y : x + y - mod; }
inline void dec(int &x, int y) { x = x - y >= 0 ? x - y : x - y + mod; }
inline int pow_mod(int a, int n) {
  int b = a, res = 1;
  while (n > 0) {
    if (n & 1) res = (long long)res * b % mod;
    b = (long long)b * b % mod;
    n >>= 1;
  }
  return res;
}
int main() {
  read(n);
  read(k);
  int tms = 1;
  poly[0] = 1;
  for (int i = 1; i <= n; ++i) {
    int x;
    read(x);
    tms = (long long)tms * x % mod;
    for (int j = i; j >= 0; --j)
      poly[j] =
          ((long long)poly[j] * x % mod - (j ? poly[j - 1] : 0) + mod) % mod;
  }
  int sum = 0;
  for (int i = 0, fac = 1; i <= n && i <= k;
       fac = (long long)fac * (k - (i++)) % mod)
    inc(sum, (long long)fac * poly[i] % mod * pow_mod(n, k - i) % mod);
  dec(tms, (long long)sum * pow_mod(pow_mod(n, k), mod - 2) % mod);
  printf("%d\n", tms);
  return 0;
}
