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.util.Scanner;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Fish <lyhypacm@gmail.com>
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    private static final long MOD = 1000000007;

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        long[] p = new long[n + 1];
        p[0] = 1;
        for (int i = 1; i <= n; ++i)
            p[i] = p[i - 1] * i % MOD;
        int[] a = new int[m];
        for (int i = 0; i < m; ++i) {
            a[i] = in.nextInt();
        }
        Arrays.sort(a);
        long ret = p[n - m];
        for (int i = 1; i < m; ++i) {
            if (a[i] - a[i - 1] > 1) {
                ret *= Numeric.exp(p[a[i] - a[i - 1] - 1], MOD - 2, MOD);
                ret %= MOD;
                ret *= Numeric.exp(2, a[i] - a[i - 1] - 2, MOD);
                ret %= MOD;
            }
        }
        ret *= Numeric.exp(p[a[0] - 1], MOD - 2, MOD);
        ret %= MOD;
        ret *= Numeric.exp(p[n - a[m - 1]], MOD - 2, MOD);
        ret %= MOD;
        out.println(ret);
    }
}

class InputReader {
    private Scanner scanner;

    public InputReader(InputStream inputStream) {
        scanner = new Scanner(new BufferedReader(new InputStreamReader(inputStream)));
    }

    public int nextInt() {
        return scanner.nextInt();
    }

    public long nextLong() {
        return scanner.nextLong();
    }

    public String next() {
        return scanner.next();
    }

    public BigInteger nextBigInteger() {
        return scanner.nextBigInteger();
    }

    public BigDecimal nextBigDecimal() {
        return scanner.nextBigDecimal();
    }

    public double nextDouble() {
        return scanner.nextDouble();
    }

    public boolean hasNext() {
        return scanner.hasNext();
    }
}

class OutputWriter {
    private PrintWriter printWriter;

    public OutputWriter(OutputStream outputStream) {
        printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        printWriter = new PrintWriter(writer);
    }

    public <T> void print(T object) {
        printWriter.print(object);
    }

    public <T> void println(T object) {
        printWriter.println(object);
    }

    public void println() {
        printWriter.println();
    }

    public void close() {
        printWriter.close();
    }
}

class Numeric {
    public static long exp(long x, long k, long MOD) {
        long result = 1;
        x %= MOD;

        while (k > 0) {
            if ((k & 1) != 0)
                result = result * x % MOD;
            x = x * x % MOD;
            k >>= 1;
        }

        return result;
    }

    public static int sqrt(int n) {
        int ret = Math.max(0, (int) Math.sqrt(n) - 2);
        while (ret * ret <= n)
            ++ret;
        return ret - 1;
    }
}
