#Lutece1748. 有根多叉树计数

有根多叉树计数

Migrated from Lutece 1748 有根多叉树计数

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

给定整数nn和集合SS( 1S1 \notin S ),求出含有nn个结点,且每个非叶结点uu的儿子数量deg(u)Sdeg(u) \in S的有根多叉树数量。树的结点无标号,结点的孩子有顺序。

Input

输入的第一行有两个整数n,mn,m.(3n105,1mn23 \leq n \leq 10^5 , 1 \leq m \leq n - 2)

接下来一行有mm个整数,分别表示SS中的元素,输入保证两两不同.(2Sin12 \leq S_i \leq n - 1)

Output

输出一行表示答案,因为答案可能较大,所以只需输出其在mod 109+7\text{mod } 10^9 +7意义下的值即可

Samples

3
1
1
4

Resources

Prepared by xiper