#include <bits/stdc++.h>
using namespace std;
int n;
bool ok;
char x[105];
int main() {
  scanf("%s", x + 1);
  n = strlen(x + 1);
  while (x[n] == '0') n--;
  ok = 1;
  for (int i = 1; i <= n / 2; i++)
    if (x[i] != x[n - i + 1]) {
      ok = false;
      break;
    }
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
