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