#P115. [KSC001A] A problem about GCD

[KSC001A] A problem about GCD

Source

This problem is adapted from Long Long OJ. All rights reserved.

Problem Description

Given a number nn, find a positive integer mm greater than 1\bm 1 such that n+mn + m is minimized while gcd(n,m)=1\gcd(n, m) = 1.

Why greater than 11? Because gcd(x,1)=1\gcd(x, 1) = 1, as everyone knows.

Input Format

There are multiple test cases.

The first line contains an integer TT representing the number of test cases.

Each of the next TT lines contains a positive integer nn.

Output Format

Output TT lines, each containing a positive integer mm.

Samples

3
1
5
12
2
2
5
1
114514
3

Data Range

For 100%100\% of the data, 1T1031 \le T \le 10^3, 1n1061 \le n \le 10^6.