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
/**
 * Created by Khoi on 30/10/2017
 * For learning purpose
 */

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;


public class main {
    InputStream is;
    PrintWriter out;
    String INPUT;
    static final long M = 1000000007;
    static final int MOD = (int) 1e9 + 7;
    static long fac[] = new long[1001];

    void solve() {
        int n = ni();
        int m = ni();

        if (n == m ) {
            out.println(1);
            return;
        }
        for (int i = 0; i < fac.length; i++)
            fac[i] = 0;
        fac[0] = 1;
        fac[1] = 1;
        fac[2] = 2;
        fac[3] = 6;

        int begin = 0;
        long combi = 1;
        int dist;
        long result;
        int[] arr = na(m);
        Arrays.sort(arr);
        for (int i = 0; i < m; i++) {
            int x = arr[i];
            dist = x - begin - 1;

            combi = (combi * modInverse(fac(dist), M)) % M;
            if (begin == 0) {
                begin = x;
                continue;
            }
            combi = ((combi * pow(dist - 1)) % M);
            begin = x;
        }
        dist = n - begin;
        combi = (combi * modInverse(fac(dist), M)) % M;
        result = ((fac(n - m) % M) * combi) % M;
        out.println(result);
    }

    long pow(int n) {
        if (n <= 0)
            return 1;
        long result = 2;
        for (int i = 1; i < n; i++)
            result = (result * 2) % M;
        return result;
    }

    long fac(int dist) {
        if (fac[dist] != 0)
            return fac[dist];
        fac[dist] = (dist * fac(dist-1)) % M;
        return fac[dist];
    }

    long d, x, y;
    void ext_gcd(long a, long b) {
        if (a==0) {
            x = 0;
            y = 1;
            d = b;
        }
        else {
            ext_gcd(b%a, a);
            long temp = x;
            x = y - (b/a) * x;
            y = temp;
        }
    }

    long modInverse(long a, long b) {
        ext_gcd(a, b);
        return (x % b + b) % b;
    }

    void run() throws Exception {
        is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis() - s + "ms");
    }

    public static void main(String[] args) throws Exception {
        new main().run();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }


    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private boolean isEndLine(int c) {
        return c < 32;
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private String nsl() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isEndLine(b))) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++) map[i] = ns(m);
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ni();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    // private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private boolean oj = true;

    private void tr(Object... o) {
        if (!oj) System.out.println(Arrays.deepToString(o));
    }
}