#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
const int mod = 1000000007;
int A[maxn], n, K, a, C, revn, ans;
int power(int x, int p) {
  int res = 1;
  while (p) {
    if (p & 1) res = 1ll * res * x % mod;
    x = 1ll * x * x % mod;
    p >>= 1;
  }
  return res;
}
void mul(int a) {
  ans = 1ll * ans * a % mod;
  for (int i = (n); i >= (1); i--) A[i] = (A[i] + 1ll * a * A[i - 1]) % mod;
}
int main() {
  scanf("%d%d", &n, &K);
  A[0] = ans = 1;
  for (int i = (1); i <= (n); i++) scanf("%d", &a), mul(a);
  C = 1;
  revn = mod - power(n, mod - 2);
  for (int i = (n); i >= (0); i--) {
    ans = (ans + mod - 1ll * C * A[i] % mod) % mod;
    C = 1ll * C * revn % mod;
    C = 1ll * C * (K - n + i) % mod;
  }
  printf("%d\n", ans);
  return 0;
}
