#include <bits/stdc++.h>
using namespace std;
map<char, int> m, q;
int main() {
  string s;
  cin >> s;
  int n = s.size() - 1;
  while (s[n] == '0') {
    n--;
  }
  for (int i = 0; i <= n / 2; i++) {
    if (s[i] != s[n - i]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
