#include <bits/stdc++.h>
using namespace std;
char a[100001];
int main() {
  string s;
  getline(cin, s);
  int len = s.length();
  reverse(s.begin(), s.end());
  string t = s;
  reverse(s.begin(), s.end());
  if (t == s) {
    printf("YES\n");
    return 0;
  }
  int k = len, cnt = 0;
  while (k--) {
    if (s[k] != '0') break;
    cnt++;
  }
  string t3 = s.substr(0, len - cnt);
  reverse(t3.begin(), t3.end());
  string t2 = t3;
  reverse(t2.begin(), t2.end());
  if (t2 == t3)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
