#include <bits/stdc++.h>
const long long MOD = 1000000007;
int N, K;
long long a[5002], FUL[5001];
long long inv[5001];
long long O;
long long POWER(long long a, long long b) {
  long long r = 1;
  for (; b; b >>= 1) {
    if (b & 1) r = r * a % MOD;
    a = a * a % MOD;
  }
  return r;
}
int main() {
  scanf("%d%d", &N, &K);
  if (N == 1) {
    printf("%lld\n", K % MOD);
    return 0;
  }
  FUL[0] = 1;
  for (int i = 1; i <= N; i++) {
    scanf("%lld", a + i);
    FUL[i] = 0;
    for (int j = i; j; j--) FUL[j] = (FUL[j] * a[i] - FUL[j - 1] + MOD) % MOD;
    FUL[0] = FUL[0] * a[i] % MOD;
  }
  inv[1] = 1;
  for (int i = 2; i <= N; i++) inv[i] = (MOD - MOD / i) * inv[MOD % i] % MOD;
  for (int i = 1; i <= N; i++) {
    static long long pol[5000];
    pol[N - 1] = (MOD - FUL[N]) % MOD;
    for (int j = N - 2; ~j; j--)
      pol[j] = (pol[j + 1] * a[i] - FUL[j + 1] + MOD) % MOD;
    long long TPW = 1;
    for (int a = 0; a < N && a < K; a++) {
      TPW = TPW * inv[N] % MOD * (K - a) % MOD;
      O = (O + pol[a] % MOD * inv[a + 1] % MOD * TPW) % MOD;
    }
  }
  printf("%lld\n", O);
  return 0;
}
