#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define ch() getchar()
#define pc(x) putchar(x)
template<typename T>inline void read(T&x){
	int f;char c;
	for(f=1,c=ch();c<'0'||c>'9';c=ch())if(c=='-')f=-f;
	for(x=0;c<='9'&&c>='0';c=ch())x=x*10+(c&15);x*=f;
}
template<typename T>inline void write(T x){
	static char q[64];int cnt=0;
	if(!x)pc('0');if(x<0)pc('-'),x=-x;
	while(x)q[cnt++]=x%10+'0',x/=10;
	while(cnt--)pc(q[cnt]);
}
const int maxm=20,maxs=(1<<16)+5,mod=1000000007;
int mo(const int x){
	return x>=mod?x-mod:x;
}
int fac[maxs],iac[maxs];
int binom(int n,int m){
	return n<0||m<0||m>n?0:1ll*iac[m]*iac[n-m]%mod*fac[n]%mod;
}
int A[maxm],f[maxs];
int main(){
	int N,M;
	read(N),read(M);
	for(int i=1;i<=M;++i)
		read(A[i]);
	int U=(1<<N)-1;
	iac[0]=iac[1]=1;
	for(int i=2;i<=U;++i)
		iac[i]=1ll*(mod-mod/i)*iac[mod%i]%mod;
	fac[0]=fac[1]=1;
	for(int i=2;i<=U;++i)
		fac[i]=1ll*fac[i-1]*i%mod,iac[i]=1ll*iac[i-1]*iac[i]%mod;
	f[0]=1;
	for(int i=M;i>=1;--i)
		for(int s=U;~s;--s)
			for(int s0=s^U,k=s0&(-s0);s0;s0^=k,k=s0&(-s0))
				f[s|k]=mo(mod-1ll*f[s]*fac[k]%mod*binom(U+1-A[i]-s,k-1)%mod+f[s|k]);
	int ans=0;
	for(int s=U;~s;--s)
		ans=mo(ans+1ll*f[s]*fac[U-s]%mod*(U+1)%mod);
	write(ans),pc('\n');
	return 0;
}
