#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;
const int D=1e9+7;
const int MAXN=18,MAXS=70000;
int n,m,a[MAXN],cnt[MAXS];
ll f[MAXN][MAXS];
ll qpow(ll x,ll k) {
	ll ret=1;
	while(k) {
		if(k&1) ret=ret*x%D;
		x=x*x%D;
		k>>=1;
	}
	return ret;
}

ll fac[MAXS+233],inv[MAXS+233];
void first(int lim) {
	fac[0]=inv[0]=1;
	for(int i=1;i<=lim;i++) fac[i]=fac[i-1]*i%D;
	inv[lim]=qpow(fac[lim],D-2);
	for(int i=lim-1;i;i--) inv[i]=inv[i+1]*(i+1)%D;
}
ll C(int x,int y) {
	if(y>x) return 0;
	return fac[x]*inv[x-y]%D*inv[y]%D;
}

void upt(ll &x,ll y) {
	x=(x+y)%D;
}
int main() {
	first(70000);
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++) scanf("%d",&a[i]);
	sort(a+1,a+m+1);
	f[m+1][0]=1;
	for(int i=m;i;i--) {
		for(int s=0;s<(1<<n);s++) if(f[i+1][s]) {
			upt(f[i][s],f[i+1][s]);
			int cnt=(1<<n)-a[i]-s;
			for(int j=0;j<n;j++) if(!((1<<j)&s)) {
				int ss=s|(1<<j);
				upt(f[i][ss],f[i+1][s]*C(cnt,(1<<j)-1)%D*fac[1<<j]);
			}
		}
	}
	ll ans=0;
	cnt[0]=1;
	for(int i=1;i<(1<<n);i++) cnt[i]=-cnt[i-(i&-i)];
	for(int s=0;s<(1<<n);s++)
		ans=(ans+cnt[s]*f[1][s]*fac[(1<<n)-s-1])%D;
	ans=ans*(1<<n)%D;
	printf("%lld\n",(ans+D)%D);
	return 0;
}