/*{{{*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
using namespace std;
typedef pair<int, int> PP;
typedef long long LL;
#define pb push_back
#define fr first
#define sc second
#define bitcnt __builtin_popcount
#define all(x) x.begin(), x.end()
inline LL ri() {LL x; scanf("%lld", &x); return x;}
#define rep2(i, n, ...) for (int i = 0; i < (n); i ++) 
#define rep3(i, a, b, ...) for (int i = (a); i < (b); i ++)
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep3, rep2)(__VA_ARGS__)
#define drep2(i, n, ...) for (int i = (n) - 1; i >= 0; i --)
#define drep3(i, a, b) for (int i = (a) - 1; i >= (b); i --)
#define drep(...) GET_MACRO(__VA_ARGS__, drep3, drep2)(__VA_ARGS__)
template<typename T>inline bool smax(T&a, T b){if(a<b){a=b;return true;}return false;} 
template<typename T>inline bool smin(T&a, T b){if(a>b){a=b;return true;}return false;} 
/*}}}*/

int n, m, a[16];


//mod int
struct mint{
  const static long long mod = 1e9 + 7;
  int x;
  mint():x(0){}       
  mint(long long x):x(((x%mod)+mod)%mod){};
  mint operator+=(const mint&a){if((x+=a.x)>=mod) x-=mod; return *this;}
  mint operator-=(const mint&a){if((x+=mod-a.x)>=mod) x-=mod; return *this;}
  mint operator*=(const mint&a){x=((LL)x*a.x)%mod; return *this;}
  mint operator*(const mint&a){return mint(*this)*=a;}
  mint operator-(const mint&a){return mint(*this)-=a;}
  mint operator+(const mint&a){return mint(*this)+=a;}
  template<typename T>mint operator*(const T&a){return mint(*this)*=a;}
  template<typename T>mint operator-(const T&a){return mint(*this)-=a;}
  template<typename T>mint operator+(const T&a){return mint(*this)+=a;}
  template<typename T>friend mint operator*(T x,const mint&m){return mint(x)*=m;}
  template<typename T>friend mint operator-(T x,const mint&m){return mint(x)-=m;}
  template<typename T>friend mint operator+(T x,const mint&m){return mint(x)+=m;}
  bool operator==(const mint& a)const{ return x == a.x;}
  operator long long () const {return x;}
};

mint pw(mint a, long long b){mint res(1);while(b){if(b&1)res*=a;a*=a;b>>=1;}return res;}
mint inv(mint a){return pw(a, mint::mod - 2);}
//mod int

const int maxn = 100000;
mint fac[maxn], invfac[maxn];

mint C(int n, int m) {
  return fac[n] * invfac[n - m] * invfac[m];
}


mint p[17][1 << 16];

mint choice[1 << 16];
int main() {

  cin >> n >> m;
  rep(i, m) cin >> a[i], a[i] --;
  fac[0] = invfac[0] = 1;
  rep(i, 1, maxn) fac[i] = fac[i - 1]  * i, invfac[i] = inv(fac[i]);
  

  reverse(a, a + m);

  p[0][0] = 1;


  choice[0] = 1;

  rep(i, 1, 1 << n) {
    choice[i] = C(i, i & -i) * choice[i - (i & -i)];
  }
   

  //cout << (2 & -2) << endl;
  //cout << choice[2] << endl;
  mint res = 0;
  for (int i = 0; i < m; i ++) {
    for (int mask = 0; mask < (1 << n); mask ++) if (p[i][mask]) {
      for (int j = 0; j < n; j ++) if (!(1 & mask >> j)) {
        if (mask + (1 << j) <= (1 << n) - a[i]) {
          p[i + 1][mask + (1 << j)] += C((1 << n) - a[i] - mask - 1, (1 << j) - 1) * p[i][mask];
        }
      }
    }

    for (int mask = 0; mask < (1 << n); mask ++) { 
      if (p[i + 1][mask]) {
        //cout << i + 1 << ' ' << mask << ' ' << p[i + 1][mask] << ' ' << (1 << n) - 1 - mask << endl;
        if (bitcnt(mask) % 2) res += p[i + 1][mask] * choice[(1 << n) - 1 - mask];
        else res -= p[i + 1][mask] * choice[(1 << n) - 1 - mask];
      }
      p[i + 1][mask] += p[i][mask]; // update
    }
  }

  //cout << fac[4] << endl;
  //cout << res << endl;
  rep(i, n) res *= 2 * fac[1 << i];
  cout << (fac[1 << n] - res) << endl;
 
  return 0;
}


Measured memory_bytes: 5632