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