#include <bits/stdc++.h>
using namespace std;
int main() {
  char cad[20];
  scanf("%s", cad);
  int f = strlen(cad) - 1;
  while (f >= 0 && cad[f] == '0') f--;
  int i = 0;
  bool st = true;
  while (i < f && st) {
    if (cad[i] != cad[f]) st = false;
    i++;
    f--;
  }
  if (st)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
