#include <bits/stdc++.h>
using namespace std;
string en = "\n";
string sp = " ";
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long int left = -1, right = -1;
  for (long long int i = 0; i < (long long int)s.size(); i++) {
    if (s[i] != '0') {
      left = i;
      break;
    }
  }
  for (long long int i = (long long int)s.size() - 1; i >= 0; i--) {
    if (s[i] != '0') {
      right = i;
      break;
    }
  }
  string p = s.substr(left, right + 1);
  if ((long long int)p.size() == 1)
    cout << "YES\n";
  else {
    long long int len = (long long int)p.size();
    long long int i = len / 2 - 1;
    long long int j = len / 2;
    if (len % 2 == 1) i++;
    bool ans = true;
    while (i >= 0 && j < len) {
      if (p[i] != p[j]) {
        ans = false;
        break;
      }
      i--;
      j++;
    }
    if (ans)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
