// Original C++ solution (slower):
#include <iostream>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <algorithm>



using namespace std;

#define MOD 1000000007

#define rint register int

#define gc() getchar()

inline int read(int r=0,int s=0,int c=gc()){for(;c<48||c>57;s=c,c=gc());for(;c>=48&&c<=57;(r*=10)+=c-48,c=gc());return s^'-'?r:-r;}

inline int fxp(int s, int n=MOD-2){int a=1; for(; n; n&1 ? a = 1ll*a*s%MOD : 0, s = 1ll*s*s%MOD, n >>= 1); return a;}

int A[20], fac[65537], efac[65537], f[20][65537], N, M, E, Ans; bool c[65537]; inline void Add(int &x, int v){(x+=v)<MOD?:x-=MOD;}

inline int C(int n, int k){return n<0||k<0||n<k?0:1ll*fac[n]*efac[k]%MOD*efac[n-k]%MOD;}

int main()

{

	N = read(), M = read(), E = 1<<N, f[0][0] = 1; for(rint i = 0; i < M; A[i++] = read()); reverse(A,A+M);

	for(rint i = fac[0] = 1; i <= E; fac[i] = 1ll*i*fac[i-1]%MOD, i++); efac[E] = fxp(fac[E]); for(rint i = E; i; efac[i-1] = 1ll*i*efac[i]%MOD, i--);

	for(rint i = 0, j, S, r; i < M; i++) for(S = 0; S < E; S++) if(f[i][S])

		for(Add(f[i+1][S],f[i][S]), r = E-A[i]-S, j = 1; j < E && j-1 <= r; !(S&j) ? Add(f[i+1][S|j],1ll*f[i][S]*C(r,j-1)%MOD*fac[j]%MOD),0 : 0, j <<= 1);

	for(rint S = 0; S < E; S?c[S]=c[S-(S&-S)]^1:0, Ans = (Ans+(c[S]?MOD-1ll:1ll)*f[M][S]%MOD*fac[E-S-1])%MOD, S++); printf("%d\n",1ll*Ans*E%MOD); return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

#include <vector>

#define file(x) freopen(#x".in", "r", stdin), freopen(#x".out", "w", stdout)



inline int read()

{

	int data = 0, w = 1; char ch = getchar();

	while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();

	if (ch == '-') w = -1, ch = getchar();

	while (ch >= '0' && ch <= '9') data = data * 10 + (ch ^ 48), ch = getchar();

	return data * w;

}



const int N(18), maxn(1 << 17), Mod(1e9 + 7);

inline void Add(int &x, int y) { x = (x + y) % Mod; }

int bin[N], fac[maxn], inv[maxn], n, m, ans, f[N][maxn], cnt[maxn], A[N];

inline int C(int n, int m) { return n < m ? 0 : 1ll * fac[n] * inv[m] % Mod * inv[n - m] % Mod; }

int fastpow(int x, int y)

{

	int ans = 1;

	for (; y; y >>= 1, x = 1ll * x * x % Mod)

		if (y & 1) ans = 1ll * ans * x % Mod;

	return ans;

}



int main()

{

	n = read(), m = read(), cnt[0] = bin[0] = fac[0] = inv[0] = 1;

	for (int i = 1; i <= n; i++) bin[i] = bin[i - 1] << 1;

	for (int i = 1; i <= bin[n]; i++) fac[i] = 1ll * fac[i - 1] * i % Mod;

	inv[bin[n]] = fastpow(fac[bin[n]], Mod - 2);

	for (int i = bin[n] - 1; i; i--) inv[i] = 1ll * inv[i + 1] * (i + 1) % Mod;

	for (int i = 1; i <= bin[n]; i++) cnt[i] = (i & 1) ? Mod - cnt[i >> 1] : cnt[i >> 1];

	for (int i = 1; i <= m; i++) A[i] = read(); std::sort(A + 1, A + m + 1);

	f[m + 1][0] = 1;

	for (int i = m; i; i--) for (int S = 0; S < bin[n]; S++) if (f[i + 1][S])

	{

		Add(f[i][S], f[i + 1][S]); int t = (bin[n] - 1) ^ S;

		for (int j = 0; j < n; j++) if (!(S & bin[j]))

			Add(f[i][S | bin[j]], 1ll * C(t - A[i] + 1, bin[j] - 1) *

					f[i + 1][S] % Mod * fac[bin[j]] % Mod);

	}

	for (int i = 0; i < bin[n]; i++)

		Add(ans, 1ll * f[1][i] * fac[bin[n] - 1 - i] % Mod * cnt[i] % Mod);

	ans = 1ll * ans * bin[n] % Mod; printf("%d\n", ans);

	return 0;

}

//fdsffffdsfgsg

// Fastest known solution for this problem: