Given a number N. Find the values of a and b such that a/b is the largest proper fraction and a + b = N. Following are constraints for fraction.
1.a/b is a proper fraction if a is less than b and a and b are co-primes i.e no common factor of a and b.
2.There can be multiple proper fractions with sum of numerator and denominator equal to a given number. The main task is to find values of a and b for which the fraction is having the maximum floating point value.
The first line consists of an integer T i.e number of test cases. The first and only line of each test case consists of an integer N.
Print the values of a and b with spaces in between.
1 <= T <= 100
3 <= n <= 105
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.