Fancy Arrays

아직 제출이 없습니다시간 제한2.5초메모리 제한256 MB

문제

Let us fix an integer mm. Consider an array aa consisting of nn positive integers. The array aa is fancy if each number in aa is a divisor of mm, and each two neighboring numbers in aa are not coprime.

Find the total number of fancy arrays of length nn. As the answer may be large, find it modulo 109+710^{9} + 7.

입력

The first line contains two integers, mm and qq: the number introduced above and the number of queries (1m10161 \le m \le 10^{16}, 1q1501 \le q \le 150). 

Each of the next qq lines contains a single integer nn (1n10181 \le n \le 10^{18}).

출력

For each query, print the number of fancy arrays for the given mm and nn modulo 109+710^{9} + 7.