#include<cstdio>
using namespace std;
#define N 17
#define mod 1000000007
int dp[1<<N],fr[1<<N],ifr[1<<N],n,m,v[N],tp[1<<N];
int pw(int a,int b){int as=1;while(b){if(b&1)as=1ll*as*a%mod;a=1ll*a*a%mod;b>>=1;}return as;}
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)scanf("%d",&v[i]);
	dp[0]=1;
	fr[0]=ifr[0]=1;
	for(int i=1;i<=1<<n;i++)fr[i]=1ll*fr[i-1]*i%mod,ifr[i]=pw(fr[i],mod-2);
	for(int i=m;i>=1;i--)
	for(int j=(1<<n)-1;j>=0;j--)
	for(int k=1;k<=n;k++)if(!(j&(1<<k-1)))
	if((1<<n)-j-v[i]-(1<<k-1)+1>=0)
	dp[j|(1<<k-1)]=(dp[j|(1<<k-1)]+1ll*dp[j]*fr[(1<<n)-j-v[i]]%mod*ifr[(1<<n)-j-v[i]-(1<<k-1)+1]%mod*(1<<k-1))%mod;
	int as=0;tp[0]=1;
	for(int i=0;i<1<<n;i++)tp[i]=tp[i>>1]*(i&1?-1:1),as=(as+1ll*tp[i]*dp[i]%mod*fr[(1<<n)-i-1]%mod*(1<<n))%mod;
	printf("%d\n",(as+mod)%mod);
}//