#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int primeNumber(int n);
int palindrome(int n);
int main() {
int n,a,b;
scanf("%d",&n);
a=primeNumber(n);
b=palindrome(n);
if(a==1 & b==1){
printf("YES");
}else{
printf("NO");
}
return 0;
}
int primeNumber(int n){
int count=0,i;
for(i=2;i<n;i++){
if(n%i==0){
count++;
}
}
if(count==0){
return 1;
}else{
return 2;
}
}
int palindrome(int n ){
int Nnum,Onum,rem;
Onum=n;
while(n!=0){
rem=n%10;
Nnum=Nnum*10+rem;
n/=10;
}
if(Onum==Nnum){
return 1;
}else{
return 2;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: