// by Balloons
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define mpr make_pair
#define debug() puts("okkkkkkkk")
#define rep(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)

using namespace std;

typedef long long LL;
#define int LL

const int inf = 1e9,maxn=2e5+5,mod=1e9+7;
int n,m,a[maxn],bit[maxn],dp[25][maxn],c[maxn],fac[maxn],inv[maxn];
int pw(int x,int y){if(y==0)return 1;if(y==1)return x;int mid=pw(x,y>>1);if(y&1)return 1ll*mid*mid%mod*x%mod;return 1ll*mid*mid%mod;}
int C(int x,int y){return 1ll*fac[x]*inv[y]%mod*inv[x-y]%mod;}
signed main(){
	scanf("%lld%lld",&n,&m);
	for(int i=1;i<=m;i++)scanf("%lld",&a[i]);reverse(a+1,a+m+1);
	for(int i=0;i<=n-1;i++)bit[i] = 1<<i;
	int cnt = 1<<n;
	
	fac[0]=inv[0]=1;for(int i=1;i<=cnt;i++)fac[i]=1ll*fac[i-1]*i%mod;
	inv[cnt] = pw(fac[cnt],mod-2);
	for(int i=cnt-1;i>=0;i--)inv[i] = 1ll*inv[i+1]*(i+1)%mod;
	
//	printf("%d\n",cnt);
//	printf("%d\n",C(5,3));
	dp[0][0] = 1;
	for(int i=1;i<=m;i++)
		for(int S=0;S<=(1<<n)-1;S++){
			int lft=cnt-a[i]+1-S;
			(dp[i][S] += dp[i-1][S]) %= mod;
			for(int j=0;j<=n-1;j++){
				if(lft < bit[j])break;
				if(bit[j] & S)continue;
				(dp[i][S^(bit[j])] += 1ll*dp[i-1][S]*C(lft-1,bit[j]-1)%mod*fac[bit[j]]%mod) %= mod;
//				printf("%d\n",dp[i][S^bit[j]]);
			}
		}
	int ans=fac[cnt-1];c[0] = 1;
//	printf("%d %d\n",cnt,ans);
//	p
	for(int S=1;S<=(1<<n)-1;S++){
		c[S] = -c[S - (S&(-S))];
		(ans += 1ll*c[S]*dp[m][S]%mod*fac[cnt-1-S]%mod) %= mod;
//		printf("q %d\n",ans);
	}
	ans = (1ll*ans*cnt%mod+mod)%mod;
	printf("%lld\n",ans);

	return 0;
}
