// Slower C++ solution:
#include <bits/stdc++.h>



#define fr first

#define sc second

#define mk make_pair

#define pb push_back

#define sz(s) (int)s.size()

#define all(s) s.begin(), s.end()

#define int long long



using namespace std;



const int N = 25, MASK = 1 << 18, mod = 1e9 + 7;



int n, m, ar[N], dp[N][MASK], fc[MASK], in[MASK], nn, ans;



int binpow (int a, int b)

{

    if (b == 0)

        return 1ll;



    if (b & 1)

        return (a * 1ll * binpow(a, b - 1) % mod);



    int res = binpow(a, b >> 1);



    return (res * 1ll * res % mod);

}

int Calc (int n, int k)

{

    if (n < k)

        return 0ll;



    return fc[n] * 1ll * in[k] % mod * in[n - k] % mod;

}

main()

{

    cin >> n >> m;



    nn = (1 << n);



    fc[0] = in[0] = 1;



    for (int i = 1; i <= nn; i++)

    {

        fc[i] = fc[i - 1] * 1ll * i % mod;

        in[i] = binpow(fc[i], mod - 2);

    }

    for (int i = 1; i <= m; i++)

        cin >> ar[i];



    sort( ar + 1, ar + m + 1, greater <int>() );



    dp[0][0] = 1;



    for (int i = 1; i <= m; i++)

    {



        for (int mask = 0; mask < (1 << n ); mask++)

        {

            int sum = 0;



            for (int j = 0; j < n; j++)

            {

                if (mask & (1 << j))

                    sum += (1 << j);

            }

            dp[i][mask] += dp[i - 1][mask];

            dp[i][mask] %= mod;

            for (int j = 0; j < n; j++)

            {

                if (!(mask & (1 << j)) ) continue;



                dp[i][mask] += ( (dp[i - 1][mask ^ (1 << j) ] * 1ll * fc[ (1 << j) ] ) % mod * 1LL * Calc( nn - ar[i] - sum + (1 << j), (1 << j) - 1 ) ) % mod;

                dp[i][mask] %= mod;

            }

        }

    }

    for (int mask = 0; mask < (1 << n); mask++)

    {

        int res = dp[m][mask], sum = 0;



        if (__builtin_popcount(mask) & 1)

            res = -res + mod;



        for (int i = 0; i < n; i++)

        {

            if (mask & (1 << i)) continue;

            sum += (1 << i);

        }



        ans = ans + res * fc[sum] % mod;



        ans %= mod;

    }

    cout << ans * (1 << n) % mod << endl;

}


// Faster C++ solution for the same problem (measured speedup: 1.2676955159005778x):
#include<bits/stdc++.h>



#define LL long long

#define RG register



using namespace std;

template<class T> inline void read(T &x) {

	x = 0; RG char c = getchar(); bool f = 0;

	while (c != '-' && (c < '0' || c > '9')) c = getchar(); if (c == '-') c = getchar(), f = 1;

	while (c >= '0' && c <= '9') x = x*10+c-48, c = getchar();

	x = f ? -x : x;

	return ;

}

template<class T> inline void write(T x) {

	if (!x) {putchar(48);return ;}

	if (x < 0) x = -x, putchar('-');

	int len = -1, z[20]; while (x > 0) z[++len] = x%10, x /= 10;

	for (RG int i = len; i >= 0; i--) putchar(z[i]+48);return ;

}

const int N = 18, Mod = 1e9 + 7;

int n, m, limit, cnt[1 << N];

LL fac[1 << N], ifac[1 << N], a[N];

LL f[N][1 << N];

LL fpow(LL a, int b) {

	LL res = 1;

	for (; b; b >>= 1, a = a * a % Mod) if (b & 1) res = res * a % Mod;

	return res;

}

LL C(int n, int m) {

	if (n < m) return 0;

	return fac[n] * ifac[m] % Mod * ifac[n - m] % Mod;

}

void pls(LL &x, LL y) {

	x += y;

	if (x >= Mod) x -= Mod;

	if (x < 0) x += Mod;

}

int main() {

	read(n), read(m);

	for (int i = 1; i <= m; i++) read(a[i]);

	sort(a + 1, a + 1 + m);

	limit = 1 << n; fac[0] = 1;

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

	ifac[limit] = fpow(fac[limit], Mod - 2);

	for (int i = limit; i >= 1; i--) ifac[i - 1] = ifac[i] * i % Mod;

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

	for (int i = m; i; i--)

		for (int S = 0; S < limit; S++)

			if (f[i + 1][S]) {

				pls(f[i][S], f[i + 1][S]);

				int s = limit - S; //剩下的

				for (int j = 0; j < n; j++)

					if (!(S >> j & 1))

						pls(f[i][S | (1 << j)], f[i + 1][S] * C(s - a[i], (1 << j) - 1) % Mod * fac[1 << j] % Mod);

			}

	LL ans = 0;

	cnt[0] = 1; for (int i = 0; i < limit; i++) cnt[i] = (i & 1) ? -cnt[i >> 1] : cnt[i >> 1];

	for (int i = 0; i < limit; i++)

		pls(ans, f[1][i] * fac[limit - 1 - i] % Mod * cnt[i]);

	printf("%lld\n", ans * limit % Mod);

	return 0;

}