import java.io.*;
import java.util.*;
public class Solution {
public static void main
(String[] args
) { Scanner sc
= new Scanner
(System.
in); int a = -4;
if(a < 0) a = -a;
int squareNum = a*a;
int temp = a;
int count = 0; // count of digit of a
while(temp > 0){
count++;
temp = temp/10;
}
int lastDigit
= squareNum
%(int)Math.
pow(10, count
); // System.out.print(lastDigit);
if(lastDigit
== a
) System.
out.
print("Automorphic"); else System.
out.
print("Not Automorphic");
}
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC4qOwpwdWJsaWMgY2xhc3MgU29sdXRpb24gewoJCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKCQlTY2FubmVyIHNjID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlpbnQgYSA9IC00OwoJCWlmKGEgPCAwKSBhID0gLWE7CgkJaW50IHNxdWFyZU51bSA9IGEqYTsKCQlpbnQgdGVtcCA9IGE7CgkJaW50IGNvdW50ID0gMDsgLy8gY291bnQgb2YgZGlnaXQgb2YgYQoJCXdoaWxlKHRlbXAgPiAwKXsKCQkJY291bnQrKzsKCQkJdGVtcCA9IHRlbXAvMTA7CgkJfQoJCWludCBsYXN0RGlnaXQgPSBzcXVhcmVOdW0lKGludClNYXRoLnBvdygxMCwgY291bnQpOwoJCS8vIFN5c3RlbS5vdXQucHJpbnQobGFzdERpZ2l0KTsKCQlpZihsYXN0RGlnaXQgPT0gYSkgU3lzdGVtLm91dC5wcmludCgiQXV0b21vcnBoaWMiKTsKCQllbHNlIFN5c3RlbS5vdXQucHJpbnQoIk5vdCBBdXRvbW9ycGhpYyIpOwoJCQoJfQp9Cg==