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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Mahmoud Aladdin
 */
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();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader jin, PrintWriter jout) {
        int n = jin.int32();
        int m = jin.int32();
        int[] on = IOUtils.read1DIntArray(jin, m);

        Arrays.sort(on);
        long numPerm = modFact(n - m);
        numPerm *= modInverse(modFact(on[0] - 1));
        numPerm %= MOD;
        numPerm *= modInverse(modFact(n - on[m - 1]));
        numPerm %= MOD;

        for(int i = 1; i < m; i++) {
            int diff = on[i] - 1 - on[i - 1];
            if(diff == 0) continue;
            long div = modInverse(modFact(diff));
            long exp = modPow(2, diff - 1);
            long tResult = ((div % MOD) * (exp % MOD)) % MOD;
            numPerm *= tResult % MOD;
            numPerm %= MOD;
        }

        jout.println(numPerm);
    }

    private long modInverse(long num) {
        return modPow(num, MOD - 2);
    }

    private long modPow(long base, long exp) {
        if(exp == 0) return 1;
        long result = (exp & 1) == 0? 1 : base;
        long tExp = exp >> 1;
        long tResult = modPow(base, tExp);

        tResult = (tResult * tResult) % MOD;
        return ((result % MOD) * (tResult % MOD)) % MOD;
    }

    public static final long MOD = (long)1e9+7;

    public long modFact(int n) {
        if(n == 0) return 1;
        return ((n % MOD) * (modFact(n - 1) % MOD)) % MOD;
    }
}

class InputReader {
    private static final int bufferMaxLength = 1024;
    private InputStream in;
    private byte[] buffer;
    private int currentBufferSize;
    private int currentBufferTop;
    private static final String tokenizers = " \t\r\f\n";

    public InputReader(InputStream stream) {
        this.in = stream;
        buffer = new byte[bufferMaxLength];
        currentBufferSize = 0;
        currentBufferTop = 0;
    }

    private boolean refill() {
        try {
            this.currentBufferSize = this.in.read(this.buffer);
            this.currentBufferTop = 0;
        } catch(Exception e) {}
        return this.currentBufferSize > 0;
    }

    public String line() {
        StringBuffer tok = new StringBuffer();
        Byte first;
        while((first = readChar()) != null) {
            tok.append((char)first.byteValue());
            if((char)first.byteValue() == '\n')
                break;
        }
        return tok.toString();
    }

    public Byte readChar() {
        if(currentBufferTop < currentBufferSize) {
            return this.buffer[this.currentBufferTop++];
        } else {
            if(!this.refill()) {
                return null;
            } else {
                return readChar();
            }
        }
    }

    public String token()  {
        StringBuffer tok = new StringBuffer();
        Byte first;
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) != -1));
        if(first == null) return null;
        tok.append((char)first.byteValue());
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) == -1)) {
            tok.append((char)first.byteValue());
        }
        return tok.toString();
    }


    public String next() {
        return token();
    }

    public Integer int32() throws NumberFormatException {
        String tok = token();
        return tok == null? null : Integer.parseInt(tok);
    }

    public Long int64() throws NumberFormatException {
        String tok = token();
        return tok == null? null : Long.parseLong(tok);
    }
}

class IOUtils {
    public static int[] read1DIntArray(InputReader in, int size) {
        int[] arr = new int[size];
        for(int i = 0; i < size; i++) {
            arr[i] = in.int32();
        }
        return arr;
    }

    public static int[][] read2DIntArray(InputReader in, int rowSize, int colSize) {
        int[][] arr = new int[rowSize][];
        for(int i = 0; i < rowSize; i++) {
            arr[i] = IOUtils.read1DIntArray(in, colSize);
        }
        return arr;
    }
}

