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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class Solution{
	
	static final int mod = (int)1e9+7;
	static final int maxn = 1005;
	static int n, m;
	
	
	
    public static void main(String[] args) throws IOException {
     
    	FastScanner fs = new FastScanner();
    	PrintWriter out = new PrintWriter(System.out);
    	
    	
    		
    	int tt = 1;
    	while(tt-->0) {
    		
    		
    		n = fs.nextInt(); m = fs.nextInt();
    		
    		int[] arr = fs.readArray(m);
    		ruffleSort(arr);
    		
    		
    		int[] fact = new int[maxn];
    		fact[0] = 1;
    		for(int i=1;i<maxn;i++) fact[i] = mul(fact[i-1], i);
    		int[] invFact = new int[maxn];
    		for(int i=0;i<maxn;i++) invFact[i] = inv(fact[i]);
    		
    		int k = 1;
    		int invf = 1;
    		
    		for(int i=1;i<m;i++) {
    			if(arr[i]>arr[i-1]+1) {
    				k = mul(k, bExp(2, arr[i]-arr[i-1]-2));
    				invf = mul(invf, invFact[arr[i]-arr[i-1]-1]);
    			}
    		}
    		
    		if(arr[0]>1) invf = mul(invf, invFact[arr[0]-1]);
    		if(arr[m-1]<n) invf = mul(invf, invFact[n-arr[m-1]]);
    		
    		int ans = mul(mul(fact[n-m], k), invf);
    		out.println(ans);
    		
    		
    	}
    	
    		
    		
    		
    	out.close();
    		
    }
    
    
    
    static int inv(int n) {
    	return bExp(n, mod-2);
    }
    
    static int bExp(int a, int n) {
    	int res = 1;
    	while(n>0) {
    		if((n&1)==1) res = mul(res, a);
    		a = mul(a, a);
    		n = n>>1;
    	}
    	return res;
    }
    
    static int add(int a, int b) {
    	a += b;
    	if(a>=mod) return a-mod;
    	return a;
    }
    
    
    static int mul(int a, int b) {
    	return (int)(((long)a*b)%mod);
    }
    
    
    
    static final Random random=new Random();
    	
    static void ruffleSort(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;
    	}
    	Arrays.sort(a);
    }
    
    static void ruffleSort(long[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); long temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
   
  
    
    static void reverse(int[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		int temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    static void reverse(long[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		long temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    
    static <T> void reverse(T[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++) {
    		T temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    	
    	
    static class FastScanner{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringTokenizer st = new StringTokenizer("");
     
    	public String next(){
    		while(!st.hasMoreElements()){
    			try{
    				st = new StringTokenizer(br.readLine());
    			} catch(IOException e){
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}
    		
    	public String nextLine() throws IOException {
    		return br.readLine();
    	}
    		
    	public int nextInt(){
    		return Integer.parseInt(next());
    	}
     
    	public int[] readArray(int n){
    		int[] a = new int[n];
    		for(int i=0;i<n;i++)
    			a[i] = nextInt();
    		return a;
    	}
    		
    	public long nextLong() {
    		return Long.parseLong(next());
    	}
    		
    	public char nextChar() {
    		return next().toCharArray()[0];
    	}
    }
   	
}
