#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int i, t, temp, r, temp2, rev, x;
  scanf("%d", &n);
  temp = n;
  for (i = 1; i < 1000000001; i++) {
    x = pow(10, i);
    if (n % x == 0) {
      continue;
    } else {
      t = i - 1;
      break;
    }
  }
  temp = temp / pow(10, t);
  temp2 = temp;
  rev = 0;
  while (temp != 0) {
    r = temp % 10;
    rev = rev * 10 + r;
    temp = temp / 10;
  }
  if (rev == temp2) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
}
