#include <bits/stdc++.h>
#define cal(a,b) ((a+=b)%=mo)
using namespace std;
const int N=1<<17,mo=1e9+7;
int fap(int a,int b){
    int s=1;
    for (; b; b>>=1,a=1ll*a*a%mo)
	if (b&1) s=1ll*s*a%mo;
    return s;
}
int n,m,S,a[20],f[N],pl[N],nl[N],num[N];
int C(int x,int y){
    if (x<y) return 0;
    return 1ll*pl[x]*nl[y]%mo*nl[x-y]%mo;
}
int main(){
    cin>>n>>m,S=1<<n;
    for (int i=1; i<=m; ++i) cin>>a[i];
    f[0]=pl[0]=nl[0]=1;
    for (int i=1; i<=S; ++i) pl[i]=1ll*pl[i-1]*i%mo;
    nl[S]=fap(pl[S],mo-2);
    for (int i=S-1; i; --i) nl[i]=1ll*nl[i+1]*(i+1)%mo;
    f[0]=1;
    for (int i=m; i>=1; --i)
	for (int s=S-1; ~s; --s)
	    for (int j=0; j<n; ++j)
		if (s>>j&1)
		    cal(f[s],1ll*f[s^(1<<j)]*C(S-s-a[i]+(1<<j),(1<<j)-1)%mo*pl[1<<j]%mo);
    for (int i=1; i<S; ++i) num[i]=num[i>>1]+(i&1);
    int ans=0;
    for (int i=0; i<S; ++i)
	if (!(num[i]&1))
	    cal(ans,1ll*f[i]*pl[S-i-1]%mo);
	else
	    cal(ans,mo-1ll*f[i]*pl[S-i-1]%mo);
    for (int i=1; i<=n; ++i)
	cal(ans,ans);
    cout<<ans;
    return 0;
}
