#include <bits/stdc++.h>
using namespace std;
int main() {
  char num[20], rev[20];
  scanf("%s", num);
  for (int i = strlen(num) - 1;; i--) {
    if (num[i] != '0') {
      num[i + 1] = '\0';
      break;
    }
  }
  for (int i = strlen(num) - 1, j = 0; i >= 0; i--, j++) {
    rev[j] = num[i];
  }
  rev[strlen(num)] = '\0';
  if (strcmp(num, rev) == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
