#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const auto INF = 0x3f3f3f3f;
const int N = 1e5 + 5;
char str[N];
int main() {
  scanf("%s", str);
  int len = (int)strlen(str);
  int j = len - 1;
  while (j >= 0 && str[j] == '0') j--;
  int i = 0;
  while (i < len && str[i] == '0') i++;
  bool flag = true;
  while (i < j && flag) {
    if (str[i] != str[j]) flag = false;
    i++, j--;
  }
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
}
