Ben had two numbers M and N. He factorized both the numbers, that is, expressed M and N as a product of prime numbers.
M = (P1A1)*(P2A2 )*(P3A3)*… *(PNAN)
N = (Q1B1)*(Q2B2 )*(Q3B3)*… *(QNBN)
Unfortunately, Ben has lost both the numbers M and N but still he has arrays A and B. He wants to reterive the numbers M and N but he will not be able to. Your task is to determine the minimum and the maximum number of factors their product (that is, M∗N) could have. Your task is to tell Ben the minimum and the maximum number of factors that the product of M and N could have.
Since the answer can be large, print modulo 1000000007.
Input format
Output format
For each test case, print a single line line containing two integers denoting the minimum and maximum number of factors which a product of M and N could have.
Constraints
1≤T≤20000
1≤N≤200000
1≤Ai,Bi≤106
The sum of N over all test cases does not exceed 200000.
First test case:
In this test case we can assume M as P12 and N as Q11. Their product will be S=P12.Q11, for minimum number of factors we can assume P1 equal to Q1 and in that case S will be P13 and the number of factors will be 1,P11,P12 and P13. Note that P1 is a prime number. For maximum number of factors we will assume them to be different and factors in that case will be 1,P11,Q11,P12,P11Q11,P12Q11.
Minimum and maximum number of factors are 4 and 6 respectively.
Second test case:
M=P12P22 and N=Q11Q23
Their product S=M*N=P12P22Q11Q23
For minimum number of factors we can assume P1 and Q1 equal and P2 and Q2 equal and S will be P13Q15 and number of factors in this case are 24.
Number of factors=(3+1)*(5+1)=24.
Note that we can not assume P1 equal to P2 because that is a constraint in the probelm statement that P1 and P2 are different.
For maximum we can assume P1,P2,Q1 and Q2 different.