#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int i = str.length() - 1;
  while (str[i] == '0' && i-- >= 0) {
  }
  for (int j = 0; j <= i; j++) {
    if (str[j] != str[i - j]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
