#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long i;
  long long left = 0, right = 0;
  i = 0;
  while (s[i] == '0') {
    i++;
    left++;
  }
  int j = s.length() - 1;
  while (s[j] == '0') {
    j--;
    right++;
  }
  if (left > right) {
    cout << "NO" << endl;
    return 0;
  }
  i = left;
  j = s.length() - right - 1;
  while (i < j) {
    if (s[i] == s[j]) {
      i++;
      j--;
    } else
      break;
  }
  if (i < j)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
}
