#include <bits/stdc++.h>
using namespace std;
char s[1000];
int x;
int main() {
  scanf(" %d", &x);
  while (!(x % 10)) x /= 10;
  int n = 0;
  while (x) s[++n] = x % 10, x /= 10;
  for (int i = 1; i <= n; i++)
    if (s[i] != s[n - i + 1]) {
      printf("NO\n");
      return 0;
    }
  printf("YES\n");
  return 0;
}
