GCD-determinant#3243

GCD-determinant

2 seconds
64 megabytes
Very easy

Vasya has recently studied the determinants and now wants to apply them in the field of number theory. He compiled a matrix of n \times n, where the element in the -th row and -th column is \gcd(i, j). For example, for n = 3 we obtain the determinant:

Now Vasya must calculate the value of the determinant of this matrix, but the task was beyond him, and now you have to solve it. Since the determinant can get quite large, Vasya asks to calculate it modulo .

Input

The first line of the input file contains a number of tests (1 \le t \le 100000). Each subsequent line contains the number – the order of the determinant (1 \le n \le 10^9).

Output

For each test case output the value of the corresponding determinant modulo .

Examples

Example 1

Loading
Loading