#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int out = 0, fh = 1;
  char jp = getchar();
  while ((jp > '9' || jp < '0') && jp != '-') jp = getchar();
  if (jp == '-') fh = -1, jp = getchar();
  while (jp >= '0' && jp <= '9') out = out * 10 + jp - '0', jp = getchar();
  return out * fh;
}
void print(int x) {
  if (x >= 10) print(x / 10);
  putchar('0' + x % 10);
}
void write(int x, char c) {
  if (x < 0) putchar('-'), x = -x;
  print(x);
  putchar(c);
}
const int P = 1e9 + 7;
int add(int a, int b) { return a + b >= P ? a + b - P : a + b; }
void inc(int &a, int b) { a = add(a, b); }
int mul(int a, int b) { return 1LL * a * b % P; }
int fpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
const int N = 5e3 + 10;
int n, k, prod[N], ans = 1;
int main() {
  n = read(), k = read();
  prod[0] = 1;
  for (int i = 1; i <= n; ++i) {
    int a = read();
    ans = mul(ans, a);
    for (int j = i - 1; j >= 0; --j) {
      inc(prod[j + 1], P - prod[j]);
      prod[j] = mul(prod[j], a);
    }
  }
  int t = 1, inv = fpow(n, P - 2), pw = 1;
  for (int i = 0; i <= n && i <= k; ++i) {
    inc(ans, P - mul(mul(t, pw), prod[i]));
    t = mul(t, k - i);
    pw = mul(pw, inv);
  }
  write(ans, '\n');
  return 0;
}
