#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0);
  ;
  long long n;
  cin >> n;
  while (n % 10 == 0) n /= 10;
  string s = to_string(n);
  bool flag = true;
  for (long long i = 0; i < s.length() / 2 + 1; i++)
    if (s[i] != s[s.length() - 1 - i]) flag = false;
  cout << (flag == true ? "YES" : "NO");
}
