#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5;
void solve() {
  bool flag = 0;
  string s;
  cin >> s;
  long long int i, j;
  for (i = 0; i < s.size(); i++) {
    if (s[i] != '0') break;
  }
  for (j = s.size() - 1; j >= 0; j--) {
    if (s[j] != '0') break;
  }
  for (; i < j; i++, j--) {
    if (s[i] != s[j]) {
      flag = 1;
      break;
    }
  }
  if (flag)
    cout << "NO";
  else
    cout << "YES";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    solve();
    cout << '\n';
  }
  return 0;
}
