#include<bits/stdc++.h>
#define fo(i, x, y) for(int i = x, B = y; i <= B; i ++)
#define ff(i, x, y) for(int i = x, B = y; i <  B; i ++)
#define fd(i, x, y) for(int i = x, B = y; i >= B; i --)
#define ll long long
#define pp printf
#define hh pp("\n")
using namespace std;

const int mo = 1e9 + 7;

ll ksm(ll x, ll y) {
	ll s = 1;
	for(; y; y /= 2, x = x * x % mo)
		if(y & 1) s = s * x % mo;
	return s;
}

const int N = (1 << 16) + 5;

int a2[20];
int n, m, a[20];
ll fac[N], nf[N];
ll f[2][N][17]; int o;

void build(int n) {
	fac[0] = 1; fo(i, 1, n) fac[i] = fac[i - 1] * i % mo;
	nf[n] = ksm(fac[n], mo - 2); fd(i, n, 1) nf[i - 1] = nf[i] * i % mo;
}

ll C(int n, int m) {
	if(n < m || m < 0) return 0;
	return fac[n] * nf[n - m] % mo * nf[m] % mo;
}

int main() {
	a2[0] = 1; fo(i, 1, 16) a2[i] = a2[i - 1] * 2;
	scanf("%d %d", &n, &m);
	build(1 << n);
	fo(i, 1, m) scanf("%d", &a[i]);
	sort(a + 1, a + m + 1);
	f[0][0][0] = 1;
	fd(i, m, 1) {
		memcpy(f[!o], f[o], sizeof f[o]);
		ff(j, 0, a2[n]) fo(k, 0, m) if(f[o][j][k]) {
			fo(u, 0, n - 1)  if(!(j >> u & 1)) {
				int nj = j | a2[u], nk = k + 1;
				f[!o][nj][nk] = (f[!o][nj][nk] - f[o][j][k] * C(a2[n] - a[i] - j, a2[u] - 1) % mo * fac[a2[u]]) % mo;
			}
		}
		o = !o;
	}
	ll ans = 0;
	ff(j, 0, a2[n]) fo(k, 0, m) if(f[o][j][k]) {
		ans = (ans + f[o][j][k] * fac[a2[n] - 1 - j]) % mo;
	}
	ans = (ans % mo + mo) * a2[n] % mo;
	pp("%lld\n", ans);
}