#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (a && b) {
    if (a > b) {
      a %= b;
    } else {
      b %= a;
    }
  }
  return a + b;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
void insertion_Sort(int a[], int n) {}
void selection_Sort(int a[], int n) {}
void bubble_Sort(int a[], int n) {}
const double EPS = 1e-6;
string s, s1 = "";
int pos;
int main() {
  cin >> s;
  pos = s.length() - 1;
  while (s[pos] == '0') {
    --pos;
  }
  for (int i = 0; i <= (pos + 1) / 2; ++i) {
    if (s[pos - i] != s[i]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
