#include <bits/stdc++.h>
using namespace std;
long long powmod(long long a, long long n) {
  if (n == 0) return 1;
  if (n % 2) return (a * powmod(a, n - 1)) % 1000000007;
  long long c = powmod(a, n / 2);
  return (c * c) % 1000000007;
}
long long inv(long long a) { return powmod(a, 1000000007 - 2); }
long long fact[1100000];
long long invfact[1100000];
long long ncr(long long n, long long r) {
  if (r < 0 || n < 0) return 0;
  if (n < r) return 0;
  long long a = fact[n];
  a = (a * invfact[r]) % 1000000007;
  a = (a * invfact[n - r]) % 1000000007;
  return a;
}
void init() {
  fact[0] = 1;
  invfact[0] = 1;
  long long inv2 = inv(2);
  for (long long i = 1; i < 11000; i++) {
    fact[i] = (i * fact[i - 1]) % 1000000007;
    invfact[i] = inv(fact[i]);
  }
}
int main() {
  init();
  long long n, k;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = -a[i];
  }
  vector<long long> symsums(n + 1, 0);
  symsums[0] = 1;
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    vector<long long> newsums(n + 1, 0);
    for (int j = 0; j < n; j++) {
      newsums[j + 1] += symsums[j];
      newsums[j] += (symsums[j] * a[i]) % 1000000007;
      newsums[j + 1] %= 1000000007;
      newsums[j] %= 1000000007;
    }
    symsums = newsums;
  }
  reverse(symsums.begin(), symsums.end());
  long long st = 1;
  for (long long a = 0; a < n; a++) {
    if (a + 1 > k) break;
    long long cur = a + 1;
    cur *= symsums[n - 1 - a];
    cur %= 1000000007;
    cur *= inv(powmod(n, a));
    cur %= 1000000007;
    cur *= fact[a];
    cur %= 1000000007;
    st = (st * (k - a)) % 1000000007;
    st = (st * inv(a + 1)) % 1000000007;
    ans += (cur * st) % 1000000007;
    ans %= 1000000007;
  }
  ans *= inv(n);
  if (n % 2 == 0) ans *= -1;
  ans %= 1000000007;
  while (ans < 0) ans += 1000000007;
  cout << ans << endl;
}
