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