#include <iostream>
#include <cstdio>
#include <algorithm>

#define MX (1<<18)+150
#define MOD 1000000007

using std::cerr;
using std::endl;

int n, m, a[MX], fac[MX], ifac[MX], inv[MX], bin[MX], pop[MX], f[MX];

int C(int x, int y){
	if(x < y) return 0;
	return 1ll * fac[x] * ifac[y] % MOD * ifac[x-y] % MOD;
}

int main(){
	scanf("%d%d", &n, &m);
	fac[0] = ifac[0] = inv[1] = 1;
	for(int i = 2; i < MX; i++) inv[i] = 1ll * (MOD - MOD / i) * inv[MOD % i] % MOD;
	for(int i = 1; i < MX; i++) fac[i] = 1ll * fac[i-1] * i % MOD;
	for(int i = 1; i < MX; i++) ifac[i] = 1ll * ifac[i-1] * inv[i] % MOD;
	for(int i = 0; i < MX; i++) pop[i] = pop[i >> 1] + (i & 1);
	for(int i = 1; i < 20; i++) bin[i] = 1 << (i-1);
	for(int i = 1; i <= m; i++)
		scanf("%d", &a[i]);
	std::sort(a + 1, a + m + 1, [](int x, int y){return x > y;});
	f[0] = 1;
	for(int i = 1; i <= m; i++)
		for(int S = (1 << n) - 1; ~S; S--)
			for(int j = 1; j <= n; j++) if(S & bin[j])
				f[S] = (f[S] + 1ll * f[S ^ bin[j]] * C((1<<n)-a[i]-S+bin[j], bin[j]-1) % MOD * fac[bin[j]] % MOD) % MOD;
	int ans = 0;
//	for(int i = 0; i < (1 << n); i++)
//		std::cout << i << ' ' << (f[i] + MOD) % MOD << endl;
	for(int i = 0; i < (1 << n); i++){
		int now = 1ll * fac[(1<<n)-i-1] * f[i] % MOD;
		if(pop[i]&1) ans = (ans - now) % MOD;
		else		 ans = (ans + now) % MOD;
	}
	ans = 1ll * ans * (1 << n) % MOD;
	printf("%d\n", (ans + MOD) % MOD);
	return 0;
}