#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, x, rev;
  cin >> n;
  while (n % 10 == 0) n = n / 10;
  rev = 0;
  x = n;
  while (x > 0) {
    rev = rev * 10 + x % 10;
    x = x / 10;
  }
  if (rev == n)
    cout << "YES";
  else
    cout << "NO";
}
