#include<cstdio>
#include<algorithm>
#define rep(i,l,r) for (int i=(l); i<=(r); i++)
using namespace std;

const int N=17,mod=1e9+7;
int n,m,ans,a[N],f[N+1][1<<N],c[1<<N],fac[1<<N],inv[1<<N];

void inc(int &x,int y){ x=(x+y>=mod) ? x+y-mod : x+y; }

int C(int n,int m){ return n<m ? 0 : 1ll*fac[n]*inv[m]%mod*inv[n-m]%mod; }

int ksm(int a,int b){
	int res=1;
	for (; b; a=1ll*a*a%mod,b>>=1)
		if (b & 1) res=1ll*res*a%mod;
	return res;
}

int main(){
	scanf("%d%d",&n,&m); c[0]=fac[0]=1; f[m+1][0]=1;
	rep(i,1,1<<n) fac[i]=1ll*fac[i-1]*i%mod;
	inv[1<<n]=ksm(fac[1<<n],mod-2);
	for (int i=1<<n; i; i--) inv[i-1]=1ll*inv[i]*i%mod;
	rep(i,1,1<<n) c[i]=(i&1)?mod-c[i>>1]:c[i>>1];
	rep(i,1,m) scanf("%d",&a[i]); sort(a+1,a+m+1);
	for (int i=m; i; i--) rep(t,0,(1<<n)-1) if (f[i+1][t]){
		inc(f[i][t],f[i+1][t]);
		rep(j,0,n-1) if (!(t&(1<<j))) inc(f[i][t|(1<<j)],1ll*C((1<<n)-t-a[i],(1<<j)-1)*f[i+1][t]%mod*fac[1<<j]%mod);
	}
	rep(i,0,(1<<n)-1) inc(ans,1ll*f[1][i]*fac[(1<<n)-1-i]%mod*c[i]%mod);
	printf("%lld\n",1ll*ans*(1<<n)%mod);
	return 0;
}