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