KazaQ has a knapsack with volume 2⋅n and n kinds of food, where the i-th food's volume is i and the number of it is ai (1≤i≤n) meaning that the number of the i-th food that KazaQ would like to store into the knapsack is no more than ai, otherwise he would feel sick. KazaQ has a unique taste, therefore all the ai are distinct.
KazaQ plans to make a journey but after that he needs to store some food and one piece of equipment into the knapsack. He has m pieces of equipment, of which the i-th piece's volume is bi (1≤i≤n). Notice that volumes of different pieces may be the same.
Assuming that two plans are distinct if and only if they contain different pieces of equipment or there exists at least one integer k (1≤k≤n) satisfying the number of the k-th food to store into the knapsack in this two plans are different, KazaQ is intend to know what is the total number of distinct plans for storing one piece of equipment and some food into the knapsack fully. Can you help him?
The answer may be very large, so you only need to give the value of the answer modulo 109+7.