import math
for x in range(2000):
#for y in range(x):
y = 1845
z = y + x
if z > 2048:
continue
s = math.sqrt(z)
if s == int(s):
print((z, x, y))
aW1wb3J0IG1hdGgKCmZvciB4IGluIHJhbmdlKDIwMDApOgogICNmb3IgeSBpbiByYW5nZSh4KToKICB5ID0gMTg0NQogIHogPSB5ICsgeAogIGlmIHogPiAyMDQ4OgogICAgY29udGludWUKICBzID0gbWF0aC5zcXJ0KHopCiAgaWYgcyA9PSBpbnQocyk6CiAgICBwcmludCgoeiwgeCwgeSkpCiAgICAgIA==