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