#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  string str, tmp;
  int st, dr;
  cin >> str;
  for (st = 0; str[st] == '0'; ++st)
    ;
  reverse(begin(str), end(str));
  for (dr = 0; str[dr] == '0'; ++dr)
    ;
  reverse(begin(str), end(str));
  if (st > dr) {
    cout << "NO\n";
    return 0;
  }
  while (str.back() == '0') str.pop_back();
  reverse(begin(str), end(str));
  while (str.back() == '0') str.pop_back();
  tmp = str;
  reverse(begin(str), end(str));
  if (tmp == str)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
