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.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Random;
import java.util.StringTokenizer;

public class Contest {
	static PrintWriter out = new PrintWriter(System.out);

	private static final long mod = (long) 1e9 + 7;
	private static final int MAX = (int) 1e3 + 5;

	static final Random random = new Random();

	static long[] pow = new long[MAX];

	static long factorial(long n) {
		if (n <= 1)
			return 1;
		return n * factorial(n - 1);
	}

	static long perm_repitition_1(long n, long s1, long s2) {
		return factorial(n) / factorial(s1) / factorial(s2);
	}

	static long perm_repitition_2(int n, int s1, int s2) {
		if (s1 > s2) {
			int tmp = s1;
			s1 = s2;
			s2 = tmp;
		}

		ArrayList<Integer> up = new ArrayList<>(), down = new ArrayList<>();

		for (int i = s2 + 1; i <= n; i++)
			up.add(i);

		for (int i = 2; i <= s1; i++)
			down.add(i);

		// Cancel denominator from numerator
		for (int i = 0; i < down.size(); i++) {
			for (int j = 0; j < up.size(); j++) {
				if (down.get(i) == 1)
					break;
				int d = down.get(i), u = up.get(j), gcd = gcd(Math.max(d, u), Math.min(d, u));
				
				d /= gcd;
				u /= gcd;
				
				down.set(i, d);
				up.set(j, u);
			}
		}
		
		long ret = 1;
		for(int i : up)
			ret = mult(ret, i);
		return ret;
	}

	static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	public static void main(String[] args) throws FileNotFoundException {
		Scanner sc = new Scanner(System.in);

		pow[0] = 1;
		pow[1] = 1;
		for (int i = 2; i < MAX; i++)
			pow[i] = mult(pow[i - 1], 2);

		int n = sc.nextInt(), m = sc.nextInt();

		int[] on = new int[m];

		for (int i = 0; i < m; i++)
			on[i] = sc.nextInt();

		Arrayssort(on);

		int[] differences = new int[m + 1];

		// 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0
		// f(3, 4) * f(3 + 4, 5) * f(3 + 4 + 5, 6)

		differences[0] = on[0] - 1;

		for (int i = 1; i < m; i++)
			differences[i] = on[i] - on[i - 1] - 1;

		differences[m] = n - on[m - 1];

		long ans = 1;

		// Calculate 1..0..1

		for (int i = 1; i < m; i++)
			ans = mult(ans, pow[differences[i]]);

		int sum = differences[0];

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

			sum += differences[i];

			long p = perm_repitition_2(sum, differences[i], sum - differences[i]);

			ans = mult(ans, p);
		}

		out.println(ans);

		out.flush();
	}

	static long add(long a, long b) {
		return (a % mod + b % mod) % mod;
	}

	static long mult(long a, long b) {
		return (a % mod * b % mod) % mod;
	}

	static void Arrayssort(int[] a) {
		int n = a.length;// shuffle, then sort
		for (int i = 0; i < n; i++) {
			int oi = random.nextInt(n);
			int temp = a[oi];
			a[oi] = a[i];
			a[i] = temp;
		}
		java.util.Arrays.sort(a);
	}

	private static class Scanner {
		public BufferedReader reader;
		public StringTokenizer st;

		public Scanner(InputStream file) throws FileNotFoundException {
			reader = new BufferedReader(new InputStreamReader(file));
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					String line = reader.readLine();
					if (line == null)
						return null;
					st = new StringTokenizer(line);
				} catch (Exception e) {
					throw (new RuntimeException());
				}
			}
			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 reader.readLine();
		}
	}

}