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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Nafiur Rahman Khadem Shafin
 */
public class Main {
	public static void main (String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader (inputStream);
		PrintWriter out = new PrintWriter (outputStream);
		TaskC solver = new TaskC ();
		solver.solve (1, in, out);
		out.close ();
	}
	
	static class TaskC {
		private static long[][] C;
		
		private static long ncr (int n, int r) {
			for (int i = 0; i<=n; i++) {
				int tmp = Math.min (i, r);
				for (int j = 0; j<=tmp; j++) {
					C[i][j] = (j == 0 || j == i) ? 1 : (C[i-1][j-1]+C[i-1][j])%InputReader.inf;
				}
			}
			return C[n][r];
		/*//use this method only when calculating ncr less times
		if(r > n / 2) r = n - r; // because C(n, r) == C(n, n - r)
    	long ans = 1;
		for(int i = 1; i <= r; i++) {
			ans *= n - r + i;
			ans /= i;
		}
		return ans;*/
		}
		
		public void solve (int testNumber, InputReader in, PrintWriter out) {
/* This is one of the best problems I have faced, obviously out of range so seen editorial and took help
 * from saifullah and bigshow. The explanation is quite superb. It can be easily seen from the second test
 * case that if the continuous block is at side then it can be done in 1 way else in 2^(n-1) ways
 * reason behind 2^(n-1) is you have 2 options until the last option (I had solved till here myself:) )
 * But I couldn't handle the permutation between sets (consecutive). But I have understood taking help that
 * It's like you can permute all but can't change the relative position of same set directly like that.
 * So you should think same set as same type(as rule of relative position unchanged permutation) and inside
 * the set permutation can be handled using aforementioned rule. Now the problem here is implementation of
 * the set permutation . There is a superb way to do that, see it in my github repo common mathematical....
 * Here I can't use modpow2 of my personal library because I need many modpow2 so have to use dp*/
			int n = in.nextInt (), m = in.nextInt ();
			C = new long[n+5][n+5];
			ncr (n, n);
			int[] on = new int[m+5];
			for (int i = 0; i<m; i++) {
				on[i] = in.nextInt ();
			}
			Arrays.sort (on, 0, m);
			long[] p2 = new long[n+5];
			p2[0] = 1;
			for (int i = 1; i<=n; i++) {
				p2[i] = (p2[i-1]*2)%InputReader.inf;
			}
			int cnsc, os = 0;
			long ans = 1;
			for (int i = 0; i<m; i++) {
				cnsc = on[i]-(i == 0 ? 0 : on[i-1])-1;
				if (i != 0 && cnsc>1) ans = (ans*p2[cnsc-1])%InputReader.inf;//condition to handle left ones and handle rte
				ans = (ans*C[(os += cnsc)][cnsc])%InputReader.inf;
			}//right ones are due still
			ans = (ans*C[(os += (n-on[m-1]))][(n-on[m-1])])%InputReader.inf;
			out.println (ans);
		}
		
	}
	
	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;
		public static final int inf = 1000000007;
		
		public InputReader (InputStream stream) {
			reader = new BufferedReader (new InputStreamReader (stream));
			tokenizer = null;
		}
		
		public String next () {
			while (tokenizer == null || !tokenizer.hasMoreTokens ()) {
				try {
					String str;
					if ((str = reader.readLine ()) != null) tokenizer = new StringTokenizer (str);
					else return null;//to detect eof
				} catch (IOException e) {
					throw new RuntimeException (e);
				}
			}
			return tokenizer.nextToken ();
		}
		
		public int nextInt () {
			return Integer.parseInt (next ());
		}
		
	}
}

