Let us fix an integer m. Consider an array a consisting of n positive integers. The array a is fancy if each number in a is a divisor of m, and each two neighboring numbers in a are not coprime.
Find the total number of fancy arrays of length n. As the answer may be large, find it modulo 109+7.
The first line contains two integers, m and q: the number introduced above and the number of queries (1≤m≤1016, 1≤q≤150).
Each of the next q lines contains a single integer n (1≤n≤1018).
For each query, print the number of fancy arrays for the given m and n modulo 109+7.