SP15555 IITKWPCB - Check the coprimeness

Description

Find largest non-negative number less than or equal to floor (N/2) which is coprime to N. Two number a and b are considered to coprime if gcd (a, b) = 1.

Input Format

T : numbr of test cases (T = 1 && n

Output Format

For each test case, output as described in the problem statement.