#include <bits/stdc++.h>
using namespace std;
const int N = 5005, mod = 1e9 + 7;
inline int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int sub(int a, int b) { return a >= b ? a - b : a - b + mod; }
inline int mul(int a, int b) { return 1ll * a * b % mod; }
inline int power(int a, int b) {
  int res = 1;
  for (; b; b >>= 1) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
  }
  return res;
}
int n, k, f[N], a[N], res;
int main() {
  cin >> n >> k;
  cin >> f[0];
  f[1] = sub(mod, 1);
  for (int i = 2; i <= n; i++) {
    scanf("%d", &a[i]);
    for (int j = i; j; j--) f[j] = sub(mul(f[j], a[i]), f[j - 1]);
    f[0] = mul(f[0], a[i]);
  }
  int inv = power(n, mod - 2), num = 1;
  for (int i = 0; i <= n; i++) {
    res = add(res, mul(f[i], num));
    num = mul(num, mul(sub(k, i), inv));
  }
  cout << sub(f[0], res) << endl;
  return 0;
}
