#include <bits/stdc++.h>
using namespace std;
int a[15], b[15];
int cnt;
void get(int n) {
  while (n % 10 == 0) {
    n /= 10;
  }
  while (n) {
    a[cnt] = n % 10;
    b[cnt] = n % 10;
    cnt++;
    n /= 10;
  }
}
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  cnt = 0;
  get(n);
  reverse(a, a + cnt);
  int flag = 0;
  for (int i = 0; i < cnt; i++)
    if (a[i] != b[i]) {
      flag = 1;
      break;
    }
  if (!flag)
    puts("YES");
  else
    puts("NO");
  return 0;
}
