#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
const int md=1000000007;
int n,m,i,j,k,a[20],f[20][100000],ans,jc[100000],rjc[100000],inv[100000],num[100000];
int C(int n,int m)
{
	if(n<0||m<0||m>n)
		return 0;
	return 1ll*jc[n]*rjc[m]%md*rjc[n-m]%md;
}
int main()
{
	scanf("%d%d",&n,&m);
	inv[1]=1;
	for(i=2;i<=(1<<n);++i)
		inv[i]=1ll*inv[md%i]*(md-md/i)%md;
	jc[0]=rjc[0]=1;
	for(i=1;i<=(1<<n);++i)
		jc[i]=1ll*jc[i-1]*i%md,rjc[i]=1ll*rjc[i-1]*inv[i]%md;
	for(i=1;i<=m;++i)
	{
		scanf("%d",a+i);
		a[i]--;
	}
	for(i=1;i<(1<<n);++i)
		num[i]=num[i^(i&-i)]+1;
	f[m+1][0]=1;
	for(i=m+1;i>1;--i)
		for(j=0;j<(1<<n);++j)
			if(f[i][j])
			{
				f[i-1][j]=(f[i-1][j]+f[i][j])%md;
				for(k=0;k<n;++k)
					if(!(j>>k&1))
						f[i-1][j|(1<<k)]=(f[i-1][j|(1<<k)]+1ll*f[i][j]*C((1<<n)-1-a[i-1]-j,(1<<k)-1)%md*jc[1<<k])%md;
			}
	for(j=0;j<(1<<n);++j)
		ans=(ans+1ll*(num[j]&1?md-1:1)*f[1][j]%md*jc[(1<<n)-1-j]%md)%md;
	ans=1ll*ans*(1<<n)%md;
	printf("%d",ans);
	return 0;
}
