G. Goodbye
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

"Goodbye to the friends I've had, goodbye to my upstairs neighbor, goodbye to the kids downstairs, and anybody who lend me a favor."

"Or, goodbye to the positive proper divisor?"

That game is popular these days. Two player take turns to choose a specific number and claim it. The player who takes the first turn chooses one positive proper divisor of given $$$n$$$. In the next rounds, player should choose one positive proper divisor (真因数) of the number claimed in the previous round. The player who can't make a choice will win.

Formally, a positive proper divisor of $$$n$$$ is a divisor of $$$n$$$, and it cannot be either $$$1$$$ or $$$n$$$.

Now Chino is going to play this game with David. Chino always wants to win and meanwhile she wants to keep the chosen number as big as possible. If with the given $$$n$$$, Chino will win directly or fail anyway, you should also tell her.

Can you help Chino to choose her answer in the first round?

Input

The first line contains one integer $$$T ~ (1 \leq T \leq 10^3)$$$ denoting the count of testcases.

For each testcase, one line with one integer $$$n ~ (1 \leq n \leq 10^5)$$$ denoting the given $$$n$$$ in one game.

Output

For each testcase, you should output the biggest choice, or $$$0$$$ when Chino will win directly, or $$$-1$$$ when Chino will fail anyway.

Example
Input
4
3
4
8
666
Output
0
-1
4
111