#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int left = 0, right = str.size() - 1;
  while (true) {
    if (str[right] == '0') {
      right--;
      if (str[left] == '0') left++;
    } else
      break;
  }
  for (int i = 0; i <= (left + right) / 2; i++) {
    if (str[right] != str[left]) {
      cout << "NO";
      return 0;
    }
    right--;
    left++;
  }
  cout << "YES";
}
