#include <bits/stdc++.h>
using namespace std;
bool check(string str) {
  int n = str.length();
  bool f = true;
  for (int i = 0; i <= (n - 1) / 2; i++) {
    if (str[i] != str[n - 1 - i]) {
      f = false;
      break;
    }
  }
  return f;
}
int main() {
  long n;
  cin >> n;
  string str;
  while (n > 0) {
    str = (char)(n % 10 + 48) + str;
    n /= 10;
  }
  for (int i = 0; i <= 9; i++) {
    if (check(str)) {
      cout << "YES\n";
      return 0;
    }
    str = '0' + str;
  }
  cout << "NO\n";
  return 0;
}
