#include <bits/stdc++.h>
using namespace std;
bool isPalindrome(string str) {
  int i = 0, j = str.length() - 1;
  bool bp = true;
  while (i < j && bp) {
    if (str[i] != str[j]) {
      bp = false;
    } else {
      i++;
      j--;
    }
  }
  return bp;
}
int main() {
  string str;
  cin >> str;
  if (isPalindrome(str)) {
    printf("YES\n");
  } else {
    int count = 0;
    int i = str.length() - 1;
    while (i > 0 && str[i] == '0') {
      count++;
      i--;
    }
    i = 0;
    while (i < count) {
      str = '0' + str;
      i++;
    }
    isPalindrome(str) ? printf("YES\n") : printf("NO\n");
  }
  return 0;
}
