import math T = int(input()) for _ in range(T): L = int(input()) Lsq = math.isqrt(L) ans = [0,0,0] if L % 2 == 0: m,n = L//2, 1 ans = [m**2 - n**2, L, m**2 + n**2] else: x = (L**2 - 1)//2 ans = [L, x, x+1] if ans[0]**2 + ans[1]**2 == ans[2]**2: print(*ans) else: print("It is wrong anser")