#include <iostream>
using namespace std;
int main()
{
int x, a , b , c , d;
cin>>x;
a=x%10;
b=x/10;
c=x/100%10;
d=x/1000;
if (a==d and b==c) {
cout<<"YES";
}
else {
cout<<"NO"<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpCnsKICAgIGludCB4LCBhICwgYiAsIGMgLCBkOwogICAgY2luPj54OwogICAgYT14JTEwOwogICAgYj14LzEwOwogICAgYz14LzEwMCUxMDsKICAgIGQ9eC8xMDAwOwogICAgaWYgKGE9PWQgYW5kIGI9PWMpIHsKICAgICAgICBjb3V0PDwiWUVTIjsKICAgIH0KICAgIGVsc2UgewogICAgICAgIGNvdXQ8PCJOTyI8PGVuZGw7CiAgICB9CiAgICAgcmV0dXJuIDA7CiAgICB9