Prime Numbers and Emirps

 

SAMPLE INPUT

 

37

39

359

32713

773

0

 

SAMPLE OUTPUT

37 is an emirp

39 is not prime

359 is an emirp

32713 is an emirp

773 is a prime