#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[10];
  cin >> a;
  int i, j, n;
  i = 0;
  j = strlen(a) - 1;
  while (a[i] == '0') {
    i++;
  }
  while (a[j] == '0') {
    j--;
  }
  n = i + j;
  for (i = 0; i <= n / 2; i++)
    if (a[i] != a[n - i]) {
      cout << "NO";
      return 0;
    }
  cout << "YES";
  return 0;
}
