#include <bits/stdc++.h>
using namespace std;
bool isPalindrome(string n, int l, int r) {
  if (l >= r)
    return true;
  else if (n[l] != n[r])
    return false;
  return isPalindrome(n, l + 1, r - 1);
}
int main() {
  int n;
  cin >> n;
  while (n % 10 == 0) n /= 10;
  string a = std::to_string(n);
  if (isPalindrome(a, 0, a.length() - 1))
    cout << "YES";
  else
    cout << "NO";
}
