#include <bits/stdc++.h>
using namespace std;
template <typename F, typename S>
std::ostream& operator<<(ostream& os, const pair<F, S>& p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (const T& a : v) {
    os << a << ", ";
  }
  os << "]";
  return os;
}
template <typename K, typename V>
ostream& operator<<(ostream& os, const map<K, V>& m) {
  os << "{";
  for (const auto& p : m) {
    os << p.first << ":" << p.second << ", ";
  }
  os << "}";
  return os;
}
struct ModInt {
  static const long long MOD = 1e+9 + 7;
  long long v;
  ModInt() : v(0) {}
  ModInt(long long op) : v(op) {}
  ModInt operator+(ModInt op) const { return (v + op) % MOD; }
  ModInt operator-(ModInt op) const { return (v - op + MOD) % MOD; }
  ModInt operator*(ModInt op) const { return (v * op) % MOD; }
  ModInt operator/(ModInt op) const { return (v * op.inverse()) % MOD; }
  ModInt operator%(long long op) = delete;
  ModInt operator+=(ModInt op) { return v = (v + op) % MOD; }
  ModInt operator-=(ModInt op) { return v = (v - op + MOD) % MOD; }
  ModInt operator*=(ModInt op) { return v = (v * op) % MOD; }
  ModInt operator/=(ModInt op) { return v = (v * op.inverse()) % MOD; }
  ModInt operator-() const { return MOD - v; }
  bool operator==(ModInt op) const { return v == op.v; }
  bool operator!=(ModInt op) const { return v != op.v; }
  ModInt inverse() const { return pow(MOD - 2); }
  ModInt pow(long long n) const {
    if (n < 0) return pow(MOD - 1 + n);
    if (n == 0) return 1;
    ModInt res = pow(n / 2);
    return res * res * ((n & 1) ? ModInt(v) : ModInt(1));
  }
  long long get() const { return v; }

 private:
  operator long long() const { return v; }
};
istream& operator>>(istream& st, ModInt& m) {
  st >> m.v;
  return st;
}
ostream& operator<<(ostream& st, const ModInt& m) {
  st << m.v;
  return st;
}
vector<ModInt> factorial(long long n) {
  vector<ModInt> res(n, 1);
  for (long long i = 2; i < n; ++i) res[i] = res[i - 1] * ModInt(i);
  return res;
}
ModInt permutation(long long n, long long m, vector<ModInt>& factorial) {
  if (m < 0 || n < m) return 0;
  if (m == 0) return 1;
  return factorial.at(n) / factorial.at(n - m);
}
ModInt combination(long long n, long long m, vector<ModInt>& factorial) {
  if (m < 0 || n < m) return 0;
  if (m == 0) return 1;
  return factorial.at(n) / factorial.at(n - m) / factorial.at(m);
}
int main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(k);
  for (long long i = 0; i < k; ++i) {
    cin >> a[i];
  }
  long long w = (1 << k) + 1;
  vector<ModInt> f = factorial(n + 1);
  vector<vector<ModInt>> dist(k + 2, vector<ModInt>(w));
  dist[0][0] = ModInt(1);
  ModInt c = ModInt(n).inverse();
  for (long long i = 0; i < k; ++i) {
    vector<vector<ModInt>> next(k + 1, vector<ModInt>(w));
    for (long long j = 0; j < (1 << i); ++j) {
      for (long long m; m <= k; ++m) {
        next[j * 2][m] += dist[j][m] * ModInt(n - a[i]) * c;
        next[j * 2 + 1][m + 1] += dist[j][m] * ModInt(a[i]) * c;
      }
    }
    dist.swap(next);
  }
  ModInt base = 1;
  for (long long i = 0; i < k; ++i) {
    base *= combination(n, a[i], f);
  }
  ModInt ans = 0;
  for (long long i = 0; i < dist.size(); ++i) {
    ModInt part = 1;
    for (long long j = 0; j <= k; ++j) {
      part += dist[i][j] * ModInt(j);
    }
    ans += part * ModInt(2).inverse().pow(k);
  }
  ans = ans * base.inverse();
  cout << ans.get() << endl;
  return 0;
}
