#include <bits/stdc++.h>
using namespace std;
int main() {
  long long c;
  cin >> c;
  while (c % 10 == 0) c /= 10;
  int N = 0;
  char a[14] = {'\000'};
  while (c) a[N++] = (c % 10) + '0', c /= 10;
  a[N] = '\000';
  bool ok = true;
  for (int i = 0; i < N; i++)
    if (a[i] != a[N - i - 1]) ok = false;
  cout << ((ok) ? "YES" : "NO") << "\n";
  return 0;
}
