#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  int f = 0, i;
  cin >> x;
  for (i = x.size() - 1; i > 0 && x[i] == '0'; i--)
    ;
  for (int j = 0; j <= i; j++)
    if (x[j] != x[i - j]) f = 1;
  if (f == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
