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