I like short statements
and you should too
so here's the statement
without further ado
You are given positive integers . You have to count the number of length positive integer arrays such that each of the elements of the array are divisors of and the greatest common divisor of the elements is.
Since the count can be large you have to output it modulo . In other words, if the count is , you have to output .
There will be independent testcases. First line of input will contain the positive integer . Next lines will each contain three positive integers separated by spaces.
Output lines. The th line should have the answer for the th testcase.
3 2 2 16 1 5 15 3 6 15
7 1 0
In first testcase, there are such arrays