#include <bits/stdc++.h>
using namespace std;
long long inv(long long x) {
  long long a[31];
  a[0] = x;
  for (int i = 1; i < 31; i++) {
    a[i] = a[i - 1] * a[i - 1] % 1000000007LL;
  }
  long long cur = 1;
  for (int i = 0; i < 31; i++) {
    if ((1000000007LL - 2) & (1 << i)) {
      cur = cur * a[i] % 1000000007LL;
    }
  }
  return cur;
}
long long N, K, invN;
long long a[5010];
long long poly[5010];
long long cur2;
long long ans;
int main() {
  cin >> N >> K;
  invN = inv(N);
  poly[0] = 1;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    for (int j = i + 1; j >= 0; j--) {
      if (j > 0) {
        poly[j] = -poly[j - 1] + poly[j] * (a[i]) + 1000000007LL;
        poly[j] %= 1000000007LL;
      } else {
        poly[j] = poly[j] * (a[i]);
        poly[j] %= 1000000007LL;
      }
    }
  }
  cur2 = 1;
  for (int i = 0; i <= N; i++) {
    ans += (cur2 * poly[i]);
    ans %= 1000000007LL;
    cur2 = cur2 * (K - i) % 1000000007LL;
    cur2 = cur2 * inv(N) % 1000000007LL;
  }
  ans = (1000000007LL + poly[0] - ans) % 1000000007LL;
  cout << ans << endl;
}
