#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, i = 0, m, k, a, b = 0, l, t, h;
  bool check(true);
  cin >> x;
  if (x % 10 == 0) {
    while (x % 10 == 0) x = x / 10;
  }
  m = x;
  while (x != 0) {
    x = x / 10;
    i++;
  }
  k = i;
  while (b <= k / 2) {
    l = m % 10;
    b++;
    x = m;
    h = i;
    while (h != 0) {
      t = x % 10;
      x = x / 10;
      h--;
    }
    if (t != l) {
      check = false;
      break;
    }
    m = m / 10;
    i = i - 2;
  }
  if (check)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
