#include <bits/stdc++.h>
using namespace std;
char s[20];
int main() {
  scanf("%s", s);
  int len = strlen(s);
  while (len && s[len - 1] == '0') --len;
  int mid = len / 2;
  bool ans = true;
  for (int i = 0; i <= mid; ++i) {
    if (s[i] != s[len - 1 - i]) {
      ans = false;
      break;
    }
  }
  printf("%s\n", ans ? "YES" : "NO");
  return 0;
}
