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