#include <bits/stdc++.h>
using namespace std;
inline void Boost() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  Boost();
  string s;
  cin >> s;
  int start = 0;
  int fin = (int)s.size() - 1;
  int en = (int)s.size() - 1;
  while (start <= fin) {
    if (s[start] == s[fin]) {
      start++;
      fin--;
    } else {
      if (s[fin] == '0' && start == 0) {
        fin--;
      } else {
        cout << "NO";
        exit(0);
      }
    }
  }
  cout << "YES";
  return 0;
}
