SP22549 DIVFACT4 - Divisors of factorial (extreme)

Description

Find the number of divisors of **_N_**! (factorial) very fast !

Input Format

The first line contains an integer _**T**_, the number of test cases. Each line of the next **_T_** lines contains two integers _**N**_ and **_M_**.

Output Format

For each line, output a single line containing the number of divisors of **_N_**! (modulo _**M**_).