#include <bits/stdc++.h>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

ll inv[70001];
ll fact[70001];
ll inv_fact[70001];

void inv_init(){
	inv[1]=1;
	for(int i=2;i<=70000;i++){
		inv[i]=MOD-(MOD/i)*inv[MOD%i]%MOD;
	}
	fact[0]=inv_fact[0]=1;
	for(ll i=1;i<=70000;i++){
		fact[i]=fact[i-1]*i%MOD;
		inv_fact[i]=inv_fact[i-1]*inv[i]%MOD;
	}
}

ll com(ll a,ll b){
	if(b<0 || a<b)return 0;
	return (inv_fact[b]*inv_fact[a-b])%MOD*fact[a]%MOD;
}

ll dp[17][1<<16];
int n,m;
int a[17];

int main(void){
	scanf("%d%d",&n,&m);
	inv_init();
	for(int i=0;i<m;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+m);
	reverse(a,a+m);
	dp[0][0]=1;
	for(int i=0;i<m;i++){
		for(int bit=0;bit<(1<<n);bit++){
			dp[i+1][bit]+=dp[i][bit];
			dp[i+1][bit]%=MOD;
			for(int j=0;j<n;j++){
				if((bit&(1<<j)))continue;
				dp[i+1][bit+(1<<j)]+=(dp[i][bit]*com((1<<n)-a[i]-bit,(1<<j)-1))%MOD*fact[1<<j]%MOD;
				dp[i+1][bit+(1<<j)]%=MOD;
			}
		}
	}
	ll ans=0;
	for(int i=0;i<(1<<n);i++){
		if(__builtin_popcount(i)%2==0){
			ans+=dp[m][i]*fact[(1<<n)-i-1];
		}else{
			ans-=dp[m][i]*fact[(1<<n)-i-1];
		}
		ans%=MOD;
	}
	if(ans<0LL)ans+=MOD;
	ans*=(1<<n);
	ans%=MOD;
	printf("%lld\n",ans);
	return 0;
}