#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000000 + 7;
const double eps = 1e-9;
const int inf = 0x3f3f3f3f;
const long long infl = 10000000000000000;
const int maxn = 100000 + 10;
const int maxm = 1000 + 10;
int in(int &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return -1;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
int num[20];
int main() {
  int x;
  scanf("%d", &x);
  int pos = 0;
  while (x) {
    num[++pos] = x % 10;
    x /= 10;
  }
  bool ok = 0;
  int cnt = 0;
  for (int i = 1; i <= pos; ++i) {
    if (num[i]) break;
    cnt++;
  }
  int cnt2 = 0;
  for (int i = pos; i; --i) {
    if (num[i]) break;
    cnt++;
  }
  if (cnt2 <= cnt) {
    int more = cnt - cnt2;
    while (more--) {
      num[++pos] = 0;
    }
    bool p = 1;
    for (int i = 1; i <= pos / 2; ++i) {
      if (num[i] != num[pos - i + 1]) {
        p = 0;
        break;
      }
    }
    if (p) ok = 1;
  }
  puts(ok ? "YES" : "NO");
  return 0;
}
