#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n % 10 == 0) {
    n /= 10;
  }
  vector<int> v;
  while (n > 0) {
    int a = n % 10;
    v.push_back(a);
    n = n / 10;
  }
  int flag = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] != v[v.size() - 1 - i]) {
      flag = 1;
      break;
    }
  }
  if (flag == 1)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
