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.*;
import java.math.*;
import static java.lang.Math.*;
import java.security.SecureRandom;
import static java.util.Arrays.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import sun.misc.Regexp;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import sun.net.www.content.text.plain;

public class Main {
    static double EPS=pow(10,-9);
    public static void main(String[] args) throws IOException {
        new Main().run();
    }
    StreamTokenizer in;
    PrintWriter out;
//deb////////////////////////////////////////////////

    public static void deb(String n, Object n1) {
        System.out.println(n + " is : " + n1);
    }

    public static void deb(int[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(long[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(boolean[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(double[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(String[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(int[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(double[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(long[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(String[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }
    /////////////////////////////////////////////////////////////

    int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }

    void run() throws IOException {
//          in = new StreamTokenizer(new BufferedReader(new FileReader("input.txt")));
        // out = new PrintWriter(new FileWriter("output.txt"));
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.flush();
    }
//boolean inR(int x,int y){
//return (x<=0)&&(x<4)&&(y<=0)&&(y<4);
//}
  
    @SuppressWarnings("unchecked")
    void solve() throws IOException {
        //   BufferedReader re= new BufferedReader(new FileReader("C:\\Users\\ASELA\\Desktop\\PROBLEMSET\\input\\F\\10.in"));
   //           BufferedReader re = new BufferedReader(new InputStreamReader(System.in));
  //  Scanner sc= new Scanner(System.in);
        long mod=1000000007 ;
        long ans=1;
 int N=nextInt();
 long[] modI=new long[1001];
 modI[0]=1;
        for (int i = 1; i < N+1; i++) {
           ans*=i;
            ans%=mod;
            modI[i]=PowerMod(ans, mod-2, mod);
        }
 ans=1;
 int m=nextInt();
        for (int i = 1; i <= N-m; i++) {
            ans*=i;
            ans%=mod;
        }
 int[] A=new int[m];
        for (int i = 0; i < m; i++) {
            A[i]=nextInt();
            
        }
        sort(A);
    //    System.out.println("aksjdb "+PowerMod(2, 0, mod));
     //   System.out.println(ans);
        for (int i = 1; i < m; i++) {
            int k1=A[i]-A[i-1]-1;
          //  System.out.println(k1);
            if(k1>0){
            ans*=PowerMod(2, k1-1, mod);
            ans%=mod;}
            ans*=modI[k1];
            ans%=mod;
            // System.out.println(ans);
        }
       
        ans*=modI[A[0]-1];
        
        ans%=mod;
        ans*=modI[N-A[m-1]];
        ans%=mod;
        System.out.println(ans);
    }
  static  long  PowerMod(long a, long b, long m) {
   long  tempo;
  if (b ==0 ){
   tempo =  1;  //EXIT condition
   }//if
  else  if (b == 1) tempo = a;
        else { long temp = PowerMod(a,b/2,m);
            if (b%2 == 0)
               tempo = (temp*temp)%m;
            else
                tempo = ((temp*temp)%m)*a%m;
           }
    return tempo;
 } //POWERMOD method 
       
}
class node{
int parent=-1;
    TreeSet<Integer> children= new TreeSet<Integer>();

}
