i = 0
j = 0
pol = 0
while i <= 999:
j = i
while j <= 999:
temp = str(i * j)
tempInverso = temp[::-1]
if temp == tempInverso:
polTemp = int(temp)
if polTemp > pol:
pol = polTemp
j += 1
i += 1
print(pol)
aSA9IDAKaiA9IDAKcG9sID0gMAp3aGlsZSBpIDw9IDk5OToKICAgIGogPSBpCiAgICB3aGlsZSBqIDw9IDk5OToKICAgICAgICB0ZW1wID0gc3RyKGkgKiBqKQogICAgICAgIHRlbXBJbnZlcnNvID0gdGVtcFs6Oi0xXQogICAgICAgIGlmIHRlbXAgPT0gdGVtcEludmVyc286CiAgICAgICAgICAgIHBvbFRlbXAgPSBpbnQodGVtcCkKICAgICAgICAgICAgaWYgcG9sVGVtcCA+IHBvbDoKICAgICAgICAgICAgICAgIHBvbCA9IHBvbFRlbXAKICAgICAgICBqICs9IDEKICAgIGkgKz0gMQpwcmludChwb2wp