#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int cnt;
  for (int i = s.length() - 1; i >= 0; i--) {
    if (s[i] != '0') {
      cnt = i;
      break;
    }
  }
  bool k = 1;
  for (int i = 0; i <= cnt / 2; ++i) {
    if (s[i] != s[cnt - i]) {
      k = 0;
    }
  }
  if (k)
    cout << "YES";
  else
    cout << "NO";
}
