#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#define maxn 200000
#define mx 18
#define mdn 1000000007
#define ll long long
#define lowbit(x) (x&(-x))
using namespace std;

int f[mx][maxn],a[mx],jc[maxn],inv[maxn];
bool cmp(int x,int y){return x>y;}

int ksm(int bs,int mi)
{
	int ans=1;
	while(mi)
	{
		if(mi&1)	ans=(ll)ans*bs%mdn;
		bs=(ll)bs*bs%mdn;mi>>=1;
	}
	return ans;
}

int C(int n,int m)
{
	if(n>m)	return 0;
	return (ll)jc[m]*inv[m-n]%mdn*inv[n]%mdn;
}

int count(int x)
{
	int ans=0;
	while(x){if(x&1)ans++;x>>=1;}
	return ans;
}

int main()
{
	int n,m,i,j,ans=0,k;
	scanf("%d%d",&n,&m);jc[0]=inv[0]=1;
	for(i=1;i<(1<<n);i++)	jc[i]=(ll)jc[i-1]*i%mdn,inv[i]=ksm(jc[i],mdn-2);
	for(i=1;i<=m;i++)	scanf("%d",&a[i]);
	sort(a+1,a+m+1,cmp);
	f[0][0]=1;
	for(i=1;i<=m;i++)
	{
		for(j=0;j<(1<<n);j++)	f[i][j]=(f[i][j]+f[i-1][j])%mdn;
		for(j=0;j<(1<<n);j++)
			for(k=0;k<n;k++)
				if(j&(1<<k))
					f[i][j]=(f[i][j]+(ll)f[i-1][j^(1<<k)]*jc[(1<<k)]%mdn*C((1<<k)-1,(1<<n)-a[i]-j+(1<<k))%mdn)%mdn;
	}
	for(i=0;i<(1<<n);i++)
	{
		k=f[m][i];
		if(count(i)&1)	k=-k;
		ans+=(ll)k*jc[(1<<n)-1-i]%mdn;
		if(ans<0)	ans+=mdn;
		if(ans>=mdn)	ans-=mdn;
	}
	printf("%d\n",(ll)ans*(1<<n)%mdn);
	return 0;
}