Test Cases failed
import math
num=int(input())
while(num!=0):
A=int(input())
x=math.sqrt(A)
y=x*x
z=A-y
if z==0:
# print("z == 0 for A = ", A)
x=int(x)
# print("x == ", x)
for i in range (0,x):
# print("i == ", i)
for j in range (i+1,x+1):
# print("j == ", j)
if i*i + j*j==A:
flag=True
print("({},{})".format(i,j),end=" ")
continue
if flag:
print()
else:
break
num-=1