#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
string str="", str1="";
cin >> n;
while (n%10 == 0 && n>0) n/=10;
while (n>0) {str+=char(n%10 + '0'); n/=10;}
str1=str;
reverse(str.begin(), str.end());
if (str==str1) cout << "YES";
else cout << "NO";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxjc3RyaW5nPgojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJbG9uZyBsb25nIG47CglzdHJpbmcgc3RyPSIiLCBzdHIxPSIiOwoJY2luID4+IG47Cgl3aGlsZSAobiUxMCA9PSAwICYmIG4+MCkgbi89MTA7Cgl3aGlsZSAobj4wKSB7c3RyKz1jaGFyKG4lMTAgKyAnMCcpOyBuLz0xMDt9CglzdHIxPXN0cjsKCXJldmVyc2Uoc3RyLmJlZ2luKCksIHN0ci5lbmQoKSk7CglpZiAoc3RyPT1zdHIxKSBjb3V0IDw8ICJZRVMiOwoJZWxzZSBjb3V0IDw8ICJOTyI7Cn0=