Simply Emirp
while 1:
try:
a=input()
b=a[::-1]
a,b=int(a),int(b)
c=0
for i in range(2,a):
if a%i==0:
c+=1
break
if c!=0:
print(str(a)+' is not prime.')
elif a==b:
print(str(a)+' is prime.')
else:
for i in range(2,b):
if b%i==0:
c+=1
break
if c!=0:
print(str(a)+' is prime.')
else:
print(str(a)+' is emirp.')
except:
break