#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  for (long long int i = 0; i < s.size(); ++i) {
    if (s[i] == '0') {
      s.erase(i, 1);
      i--;
    }
    if (s[i] != '0') {
      break;
    }
  }
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '0') {
      s.erase(i, 1);
      i--;
    } else {
      break;
    }
  }
  string k = s;
  reverse(k.begin(), k.end());
  if (k == s) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
}
