#include <bits/stdc++.h>
using namespace std;
int ans;
string s;
bool is_palindrome(int L, int R) {
  for (int i = L; i <= R; i++)
    if (s[i] != s[R - (i - L)]) return false;
  return true;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> s;
  int n = s.size(), cnt = 0;
  while (s[n - cnt - 1] == '0') cnt++;
  cout << (is_palindrome(0, n - cnt - 1) ? "YES" : "NO");
}
