A positive integer ( x ) is considered a divisor of a positive integer ( y ) if ( y ) is divisible by ( x ) without remainder. For example, ( 1 ) is a divisor of ( 7 ), while ( 3 ) is not a divisor of ( 8 ).
You are given an integer ( d ) for multiple test cases, and your task is to find the smallest positive integer ( a ) such that:
( a ) has at least 4 divisors.
The difference between any two divisors of ( a ) is at least ( d ).
Input Format
The first line contains a single integer ( t ) ((1 \leq t \leq 3000)) — the number of test cases.
Each of the following ( t ) lines contains a single integer ( d ) ((1 \leq d \leq 10000)).
Output Format
For each test case, print one integer ( a ) — the smallest positive integer that meets the criteria specified.
Examples
Input
text
2
1
2
Output
text
6
15
Note
In the first test case, the integer ( 6 ) has the following divisors: ([1, 2, 3, 6]). There are 4 of them and the difference between any two of them is at least ( 1 ). There is no smaller integer with at least 4 divisors.
In the second test case, the integer ( 15 ) has the following divisors: ([1, 3, 5, 15]). There are 4 of them and the difference between any two of them is at least ( 2 ).
The integer ( 12 ) is INVALID because its divisors are ([1, 2, 3, 4, 6, 12]), and the difference between divisors ( 2 ) and ( 3 ) is less than ( d = 2 ).
Solution
Please place your solution in the /app/ directory.
Important: place your implementation at /app/solution.py so the verifier can run it.