#include <bits/stdc++.h>
using namespace std;
namespace modular_space {
	long long mod;
	struct umod {
		long long val;
		umod(): val(0ll){}
		umod(long long x){ x %= mod; if(x < 0) x += mod; val = x; }
		umod& operator += (umod oth){ val += oth.val; if(val >= mod) val -= mod; return *this; }
		umod& operator -= (umod oth){ val -= oth.val; if(val < 0) val += mod; return *this; }
		umod& operator *= (umod oth){ val = val * oth.val % mod; return *this; }
		umod& operator /= (umod oth){ return *this *= oth.inverse(); }
		umod& operator ^= (long long oth){ return *this = pwr(*this, oth); }
		umod operator + (umod oth) const { return umod(*this) += oth; }
	       	umod operator - (umod oth) const { return umod(*this) -= oth; }
		umod operator * (umod oth) const { return umod(*this) *= oth; }
		umod operator / (umod oth) const { return umod(*this) /= oth; }
		umod operator ^ (long long oth) const { return umod(*this) ^= oth; }
		bool operator < (umod oth) const { return val < oth.val; }
		bool operator > (umod oth) const { return val > oth.val; }
		bool operator <= (umod oth) const { return val <= oth.val; }
		bool operator >= (umod oth) const { return val >= oth.val; }
		bool operator == (umod oth) const { return val == oth.val; }
		bool operator != (umod oth) const { return val != oth.val; }
		umod pwr(umod a, long long b) const {
			umod r = 1;
			for(; b; a *= a, b >>= 1)
				if(b&1)
					r *= a;
			return r;
		}
		umod inverse() const {
			long long a = val, b = mod, u = 1, v = 0;
			while(b){
				long long t = a/b;
				a -= t * b; swap(a, b);
				u -= t * v; swap(u, v);
			}
			if(u < 0)
				u += mod;
			return u;
		}
		friend istream& operator >> (istream &is, umod &oth);
		friend ostream& operator << (ostream &os, const umod& oth);
	};
	ostream& operator << (ostream &os, const umod &oth){
		os << oth.val;
		return os;
	}
	istream& operator >> (istream &is, umod &oth){
		long long x; is >> x;
		oth = umod(x);
		return is;
	}
	struct binprime_kit {
		int sz;
		vector<umod> fat, ifat;
		void init(int s){
			sz = s;
			fat.resize(sz + 1);
			ifat.resize(sz + 1);
			fat[0] = 1;
			for(int i = 1; i <= sz; i++) fat[i] = fat[i - 1] * i;
			ifat[sz] = fat[sz] ^ (mod - 2);
			for(int i = sz - 1; i >= 0; i--) ifat[i] = ifat[i + 1] * (i + 1);
		}
		umod coef(int n, int r){
			if(n < r) return 0;
			return fat[n] * (ifat[r] * ifat[n - r]);
		}
	};
};
using U = modular_space::umod;
int main(){
	modular_space::mod = 1'000'000'007;
	modular_space::binprime_kit kit; kit.init(300'000);
	int n, m; cin >> n >> m;
	vector<int> a(m);
	for(int i = 0; i < m; i++) cin >> a[i];
	reverse(a.begin(), a.end());
	vector<U> f(1<<n, 0), nf;
	f[0] = 1;
	for(int i = 0; i < m; i++){
		nf = f;
		for(int j = 0; j < 1<<n; j++){
			for(int k = 0; k < n; k++){
				if((j>>k)&1) continue;
				int empty = ((1<<n) - a[i]) - j;
				if(empty >= (1<<k) - 1){
					nf[j|(1<<k)] += f[j] * kit.coef(empty, (1<<k) - 1) * kit.fat[(1<<k)];
				}
			}
		}
		f = nf;
	}
	U ans = 0;
	for(int i = 1; i < (1<<n); i++){
		f[i] = f[i] * kit.fat[(1<<n) - 1 - i];
		if(__builtin_popcount(i)&1) ans += f[i];
		else ans -= f[i];
	}
	ans = kit.fat[(1<<n) - 1] - ans;
	ans = ans * (1<<n);
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 6016