#include <bits/stdc++.h>
using namespace std;
char s[10];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int now = n - 1;
  while (s[now] == '0') --now;
  for (int i = 0; i <= now; ++i)
    if (s[i] != s[now - i]) {
      puts("NO");
      exit(0);
    }
  puts("YES");
  return 0;
}
