#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=17,mod=1e9+7;
int n,m,a[N],f[N][1<<N],fac[1<<N],ifac[1<<N];
int Pow(int x,int k){
    int ret=1;
    while(k){
        if(k&1)ret=(ll)ret*x%mod;
        k>>=1;x=(ll)x*x%mod;
    }
    return ret;
}
int C(int n,int m){
    if(n<m)return 0;
    return (ll)fac[n]*ifac[m]%mod*ifac[n-m]%mod;
}
int main(){
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)scanf("%d",&a[i]);
    fac[0]=1;
    for(int i=1;i<=(1<<n);i++)fac[i]=(ll)fac[i-1]*i%mod;
    for(int i=0;i<=(1<<n);i++)ifac[i]=Pow(fac[i],mod-2);
    sort(a+1,a+m+1,greater<int>());
    f[0][0]=1;
    for(int i=0;i<m;i++)
        for(int j=0;j<(1<<n);j++){
            if(!f[i][j])continue;
            f[i+1][j]=(f[i+1][j]+f[i][j])%mod;
            int res=(1<<n)-j-a[i+1];
            for(int k=0;k<n;k++){
                if(j&(1<<k))continue;
                if(res<(1<<k)-1)break;
                f[i+1][j|(1<<k)]=(f[i+1][j|(1<<k)]-(ll)f[i][j]*C(res,(1<<k)-1)%mod*fac[1<<k])%mod;
            }
        }
    int ans=0;
    for(int i=0;i<(1<<n);i++){
        ans=(ans+(ll)f[m][i]*fac[(1<<n)-1-i])%mod;
    }
    ans=((ll)ans*(1<<n)%mod+mod)%mod;
    cout<<ans<<"\n";
}