#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i = 0;
  for (i = s.size() - 1; i >= 0; i--) {
    if (s[i] != '0') break;
  }
  int c = 1;
  int j = 0;
  while (j < i) {
    if (s[j] != s[i]) {
      c = 0;
      break;
    }
    j++;
    i--;
  }
  if (c)
    cout << "YES\n";
  else
    cout << "NO\n";
}
