There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be switched off at that moment) if there's at least one adjacent light which is already switched on. 

He knows the initial state of lights and he's wondering how many different ways there exist to switch all the lights on. Please find the required number of ways modulo 1000000007 (109 + 7).

Input

The first line of the input contains two integers n and m where n is the number of lights in the sequence and m is the number of lights which are initially switched on, (1 ≤ n ≤ 1000, 1 ≤ m ≤ n). The second line contains m distinct integers, each between 1 to n inclusive, denoting the indices of lights which are initially switched on.

Output

In the only line of the output print the number of different possible ways to switch on all the lights modulo 1000000007 (109 + 7).

Examples

Input

3 1
1


Output

1


Input

4 2
1 4


Output

2


Input

11 2
4 8


Output

6720
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Solve6 {

    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(System.out);
        new Solve6().solve(pw);
        pw.flush();
        pw.close();
    }

    public void solve(PrintWriter pw) throws IOException {
        FastReader sc = new FastReader();
        final int MOD = (int) 1E+9 + 7;
        int n = sc.nextInt(), m = sc.nextInt();
        int[] a = new int[m];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        Arrays.sort(a);
        int[] grp = new int[m + 1];
        grp[0] = a[0] - 1;
        grp[m] = n - a[m - 1];
        int s = grp[0] + grp[m];
        for (int i = 1; i < m; i++) {
            grp[i] = a[i] - a[i - 1] - 1;
            s += grp[i];
        }
        int[] numerator = new int[1000], denominator = new int[1000];
        for (int k = 2; k <= s; k++) {
            int i = k;
            while ((i & 1) == 0) {
                ++numerator[2];
                i >>= 1;
            }
            for (int j = 3; j * j <= i; j += 2) {
                if (isPrime(j)) {
                    while (i % j == 0) {
                        ++numerator[j];
                        i /= j;
                    }
                }
            }
            if (i > 1) {
                ++numerator[i];
            }
        }
        for (int e = 0; e <= m; e++) {
            for (int k = 2; k <= grp[e]; k++) {
                int i = k;
                while ((i & 1) == 0) {
                    ++denominator[2];
                    i >>= 1;
                }
                for (int j = 3; j * j <= i; j += 2) {
                    if (isPrime(j)) {
                        while (i % j == 0) {
                            ++denominator[j];
                            i /= j;
                        }
                    }
                }
                if (i > 1) {
                    ++denominator[i];
                }
            }
        }
        long ans = 1;
        for (int i = 2; i < 1000; i++) {
            ans *= power(i, Math.abs(numerator[i] - denominator[i]), MOD);
            ans %= MOD;
        }
        for (int i = 1; i < m; i++) {
            if (grp[i] == 0) {
                continue;
            }
            long x = power(2, grp[i] - 1, MOD);
            ans *= x;
            ans %= MOD;
        }
        pw.println(ans);
    }

    public boolean isPrime(int n) {
        if (n == 1 || n == 0) {
            return false;
        }
        for (int i = 2; i * i <= n; i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }

    public long power(int a, int b, int MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long y = power(a, b / 2, MOD);
        if ((b & 1) == 1) {
            return (((y * y) % MOD) * a) % MOD;
        } else {
            return (y * y) % MOD;
        }
    }

    public long gcd(long a, long b) {
        if (a % b == 0) {
            return b;
        }
        return gcd(b, a % b);
    }

    static class FastReader {

        StringTokenizer st;
        BufferedReader br;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (Exception e) {
            }
        }

        public String next() {
            if (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public boolean hasNext() throws IOException {
            if (st != null && st.hasMoreTokens()) {
                return true;
            }
            String s = br.readLine();
            if (s == null || s.isEmpty()) {
                return false;
            }
            st = new StringTokenizer(s);
            return true;
        }
    }
}
