#include<bits/stdc++.h>
#define XX first
#define YY second
#define pb emplace_back
#define FOR(i,a,b) for(int (i)=(a);i<(b);++(i))
#define EFOR(i,a,b) for(int (i)=(a);i<=(b);++(i))
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define REP rep
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define all(X) (X).begin(),(X).end()
#define eb emplace_back

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef ll LL;
typedef pii PII;
typedef pll PLL;
const ll MOD=1e9+7;

#define rall(X) (X).rbegin(),(X).rend()
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rreps(X,S,Y) for (int (X) = (Y)-1;(X) >= (S);--(X))
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}

int N, M;
vector<int> A;

template<ll mod>
struct ModInt{
  using M=ModInt;
  ll a;
  M& put(ll v){
    a=(v<mod)?v:v-mod;
    return *this;
  }
  ModInt(ll v=0){put(v%mod+mod);}
  M operator+(M x){return M().put(a+x.a);}
  M operator-(M x){return M().put(a+mod-x.a);}
  M operator*(M x){return M().put(a*x.a%mod);}
  M operator/(M x){return x.inv()*a;}
  M& operator+=(M x){return *this=*this+x;};
  M& operator-=(M x){return *this=*this-x;};
  M& operator*=(M x){return *this=*this*x;};
  M& operator/=(M x){return *this=*this/x;};
  bool operator==(M x){return a==x.a;}

  M pow(ll m){
    M x=*this,res=1;
    while(m){
      if(m&1)res*=x;
      x*=x;
      m>>=1;
    }
    return res;
  }
  M inv(){return pow(mod-2);}
};
using Mod = ModInt<MOD>;

Mod Add(Mod a, Mod b) {return a+b;}
Mod Sub(Mod a, Mod b) {return a-b;}

// Fast Zeta Transform g(T)=\sum_{S \subset T}f(S)
template<class T, class F>
inline void FZT(vector<T>&f,F add){
  int n=__lg(f.size());
  int lim = 1 << n;
  rep(i, n) {
    rep(j, lim) {
      if (~j >> i & 1) f[j|1<<i]=add(f[j|1<<i],f[j]);
    }
  }
}
// Fast Modoebius Transform g(T)=\sum_{S \subset T}(-1)^{|T\S|}f(S)
template<class T,class F>
inline void FMT(vector<T>&f,F sub){
  int n=__lg(f.size());
  int lim = 1 << n;
  rep(i, n) {
    rep(j, lim) {
      if (~j >> i & 1) f[j|1<<i]=sub(f[j|1<<i],f[j]);
    }
  }
}
template<class T,class F>
inline vector<vector<T>> RankedFZT(vector<T>&f,F add){
  int n=__lg(f.size());
  int lim = 1 << n;
  vector<vector<T>> ret(n+1, vector<T>(f.size()));
  rep(i, lim) ret[__builtin_popcount(i)][i] = f[i];
  rep(i, n+1) FZT(ret[i], add);
  return ret;
}
template<class T,class F>
inline vector<T> ExactConv(vector<T>&f, vector<T>&g, F add, F sub) {
  int n=__lg(f.size());
  int lim = 1 << n;
  auto rf = RankedFZT(f, add);
  auto rg = RankedFZT(g, add);
  vector<vector<T>> c(n+1, vector<T>(f.size()));
  rep(k, n+1) {
    rep(j, k+1) rep(st, lim) {
      c[k][st] += rf[j][st]*rg[k-j][st];
    }
    FZT(c[k], sub);
  }
  vector<T> ret(lim);
  rep(i, lim) ret[i] = c[__builtin_popcount(i)][i];
  return ret;
}

Mod fact[(1 << 16)+10];
vector<Mod> dp[19];

signed main(){
  ios_base::sync_with_stdio(false);
  cout<<fixed<<setprecision(0);
  cin >> N >> M;
  A.eb(1);
  rep(i, M) {
    int a;
    cin >> a;
    A.eb(a);
  }
  reverse(all(A));

  int lim = 1 << N;
  fact[0] = 1;
  reps(i, 1, lim+5) {
    fact[i] = fact[i-1] * LL(i);
  }

  dp[0].resize(lim);
  dp[0][0] = 1;
  rep(i, M) {
    int k = lim-A[i];
    dp[i+1] = dp[i];
    rep(st, lim) {
      rep(j, N) {
        if (st >> j & 1) continue;
        int nst = st | (1 << j);
        int t = 1 << j;
        if (t-1 > k-st) continue;
        dp[i+1][nst] += dp[i][st] * fact[k-st]*t/fact[k-st-t+1];
      }
    }
  }
  rep(st, lim) {
    dp[M][st] *= fact[lim-1-st];
    //cout << st << ": " << dp[M][st].a << endl;
  }
  vector<Mod> ans(lim);
  rep(st, lim) ans[st] = dp[M][lim-1-st];
  FMT(ans, Sub);
  cout << (ans[lim-1]*lim).a << endl;
}


Measured memory_bytes: 10112