import math for x in range(1, 9): for y in range(0, 9): z = (x*10+x)*100 + y*10+y if z == int(math.sqrt(z))*int(math.sqrt(z)): print(z)