#include <bits/stdc++.h>
using namespace std;
char s[11];
int l, r;
int main() {
  cin >> s;
  r = strlen(s) - 1;
  l = 0;
  while (r && s[r] == '0') r--;
  while (l < r)
    if (s[l] != s[r])
      return printf("NO\n"), 0;
    else
      l++, r--;
  return printf("YES\n"), 0;
}
