#include <bits/stdc++.h>
const int N = 1e5 + 5, OO = 0x3f3f3f3f, mod = 1e9 + 7;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long x, long long y) { return (!y) ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return ((x / gcd(x, y)) * y); }
using namespace std;
int main() {
  string s;
  cin >> s;
  while (s[s.size() - 1] == '0') s.erase(s.size() - 1, 1);
  string d = s;
  reverse(((d).begin()), ((d).end()));
  if (s != d)
    cout << "NO";
  else
    cout << "YES";
}
