#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,h,x;
cin>>h;
a=h%10;
b=h/10%10;
c=h/100;
x=a*100+b*10+c;
if(x==h){
cout<<"Y";
}else{
cout<<"N";
}
}
/**************************************************************
Problem: 1628
User: zhengzihao3
Language: C++
Result: Accepted
Time:9 ms
Memory:2072 kb
****************************************************************/