#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[20];
  char b[500];
  while (scanf("%s", a) != EOF) {
    int n = strlen(a);
    int sum = 0, m = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (a[i] == '0') {
        m++;
      } else {
        break;
      }
    }
    for (int i = 0; i < m; i++) {
      b[i] = '0';
    }
    for (int i = m; i < m + n; i++) {
      b[i] = a[i - m];
    }
    for (int i = 0; i < (m + n) / 2; i++) {
      if (b[i] == b[n + m - i - 1]) {
        sum++;
      }
    }
    if (sum == (n + m) / 2) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
