#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
const int mod = 1000000007;
int main() {
	int N, M;
	cin >> N >> M;
	vector<int> A(M);
	for (int i = 0; i < M; ++i) {
		cin >> A[i];
	}
	vector<int> fact(1 << N), inv(1 << N), factinv(1 << N);
	fact[0] = factinv[0] = 1;
	for (int i = 1; i < 1 << N; ++i) {
		fact[i] = 1LL * fact[i - 1] * i % mod;
		inv[i] = (i == 1 ? 1 : 1LL * inv[mod % i] * (mod - mod / i) % mod);
		factinv[i] = 1LL * factinv[i - 1] * inv[i] % mod;
	}
	function<int(int, int)> comb = [&](int n, int k) {
		return n < k ? 0 : 1LL * fact[n] * factinv[k] % mod * factinv[n - k] % mod;
	};
	sort(A.begin(), A.end(), greater<int>());
	vector<int> dp(1 << N);
	dp[0] = 1;
	for (int i = 0; i < M; ++i) {
		for (int j = (1 << N) - 1; j > 0; --j) {
			for (int k = 0; k < N; ++k) {
				if (!((j >> k) & 1)) continue;
				dp[j] = (dp[j] + 1LL * dp[j - (1 << k)] * comb((1 << N) - A[i] - j + (1 << k), (1 << k) - 1) % mod * fact[1 << k]) % mod;
			}
		}
	}
	vector<int> fl(1 << N);
	int ret = 0;
	for (int i = 0; i < 1 << N; ++i) {
		if (i >= 1) fl[i] = fl[i >> 1] ^ (i & 1);
		int val = 1LL * dp[i] * fact[(1 << N) - i - 1] % mod;
		if (fl[i] == 0) ret = (ret + val) % mod;
		else ret = (ret + mod - val) % mod;
	}
	cout << 1LL * ret * (1 << N) % mod << '\n';
	return 0;
}