#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define re register
#define ll long long
inline int gi(){
	int f=1,sum=0;char ch=getchar();
	while(ch>'9' || ch<'0'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0' && ch<='9'){sum=(sum<<3)+(sum<<1)+ch-'0';ch=getchar();}
	return f*sum;
}
const int N=20,Mod=1e9+7;
int n,m,a[N],fac[1<<N],fai[1<<N],S[1<<N],f[N][1<<N],inv[1<<N];
void add(int &x,int y){x+=y;if(x>=Mod)x-=Mod;}
int C(int n,int m){
	if(n<0 || m<0 || n<m)return 0;
	return 1ll*fac[n]*fai[m]%Mod*fai[n-m]%Mod;
}
int cmp(int a,int b){return a>b;}
int main(){
	n=gi();m=gi();
	for(int i=1;i<=m;i++)a[i]=gi();
	sort(a+1,a+m+1,cmp);
	int all=1<<n;fac[0]=fai[0]=inv[0]=inv[1]=1;
	for(int i=1;i<=all;i++)fac[i]=1ll*fac[i-1]*i%Mod;
	for(int i=2;i<=all;i++)inv[i]=1ll*(Mod-Mod/i)*inv[Mod%i]%Mod;
	for(int i=1;i<=all;i++)fai[i]=1ll*fai[i-1]*inv[i]%Mod;
	for(int i=1;i<=all;i++)S[i]=S[i-(i&(-i))]+1;
	f[0][0]=1;
	for(int i=1;i<=m;i++)
		for(int s=0;s<all;s++)
			if(f[i-1][s]){
				add(f[i][s],f[i-1][s]);
				for(int j=0;j<n;j++)
					if(!(s&(1<<j)))
						add(f[i][s|(1<<j)],1ll*f[i-1][s]*fac[1<<j]%Mod*C(all-a[i]-s,(1<<j)-1)%Mod);
			}
	ll ans=0;
	for(int s=0;s<all;s++){
		if(S[s]&1)ans=(ans-1ll*f[m][s]*fac[all-s-1]%Mod+Mod)%Mod;
		else ans=(ans+1ll*f[m][s]*fac[all-s-1]%Mod)%Mod;
	}
	printf("%lld\n",1ll*ans*all%Mod);
	return 0;
}
