Consider all positive integers written in the following manner (you can imagine an infinite spiral).

Your task is to determine the position (row,column) of a given number , assuming that the center (number ) has position . Rows are numbered from top to bottom, columns are numbered from left to right (for example, number is at ). Your program should output a string containing the position of in the form (R,C) where is the row and is the column. and must not contain any leading zeroes.
The first line of the input gives an integer , which is the number of test cases. Each test case contains an integer (1 \le N < 2^{31}).
For each test case, output the position as described above. See sample output for further clarification.
1-nji mysal