Loading...
Square Reconstruction
Time: 2 s
Memory: 256 MB
    After realizing that he was being too cruel to the numbers and that Christine would be happier with the mathematician, Dr. Strange offered his help to reconstruct the beauty of the numbers. So, he came up with the following problem for you to solve, again.

Given an integer \(n\), find the minimum integer \(m\) such that \(n \times m\) is a square number.
Input
The first line contains a single integer \(t\) — the number of test cases.
The first line of each test case contains a single integer \(n\).
Constraint
\(1 \leq t \leq 10^3\) 
\(1 \leq n \leq 10^6\) 
\(1 \leq m \leq 10^{10}\)
Output
For each test case, print a single integer \(m\) — described in the statement.
Examples
Input
Output
2
10
12
10
3
Input
Output
3
1
69
75
1
69
3
Problem Info
Problem ID 96
Time Limit 2000 ms
Memory Limit 262144 KB
Moderators amirhozaifa , BeNew , AmirHamza
Statistics
Submit
You need to Login or Registration for submit your solution