#include <bits/stdc++.h>
using namespace std;
const long long N = 1e3 + 7;
string s1, s2, s;
bool used;
long long n, m;
vector<long long> v;
int main() {
  cin >> s;
  n = s.size();
  for (long long i = n - 1; i >= 0; i--) {
    if (s[i] != '0') {
      v.push_back(s[i] - '0');
      used = true;
    }
    if (s[i] == '0' && used == true) {
      v.push_back(s[i] - '0');
    }
  }
  if (v.size() % 2 != 0) {
    m = v.size() / 2;
    for (long long i = 0; i <= m; i++) {
      s1 += (v[i] + '0');
    }
    for (long long i = m; i < v.size(); i++) {
      s2 += (v[i] + '0');
    }
    reverse(s2.begin(), s2.end());
  } else {
    m = v.size() / 2;
    for (long long i = 0; i < m; i++) {
      s1 += (v[i] + '0');
    }
    for (long long i = m; i < v.size(); i++) {
      s2 += (v[i] + '0');
    }
    reverse(s2.begin(), s2.end());
  }
  cout << (s2 == s1 ? "YES" : "NO");
}
