def checkAuto(a):
if a < 0: a = -a
squareNum = a*a
temp = a
count = 0
while temp != 0:
count += 1
temp = int(temp/10)
lastDigit = squareNum%pow(10, count)
if lastDigit == a:
return "Automorphic"
else:
return "Not Automorphic"
num = -4
print(checkAuto(num))
ZGVmIGNoZWNrQXV0byhhKToKCWlmIGEgPCAwOiBhID0gLWEKCXNxdWFyZU51bSA9IGEqYQoJdGVtcCA9IGEKCWNvdW50ID0gMAoJd2hpbGUgdGVtcCAhPSAwOgoJCWNvdW50ICs9IDEKCQl0ZW1wID0gaW50KHRlbXAvMTApCglsYXN0RGlnaXQgPSBzcXVhcmVOdW0lcG93KDEwLCBjb3VudCkKCWlmIGxhc3REaWdpdCA9PSBhOgoJCXJldHVybiAiQXV0b21vcnBoaWMiCgllbHNlOgoJCXJldHVybiAiTm90IEF1dG9tb3JwaGljIgpudW0gPSAtNApwcmludChjaGVja0F1dG8obnVtKSkK