#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (a == 0) ? b : gcd(b % a, a); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int a[11];
int main() {
  int n, k = 0;
  cin >> n;
  while (n % 10 == 0) n /= 10;
  while (n > 0) {
    a[++k] = n % 10;
    n /= 10;
  }
  for (int i = 1, j = k; i <= n, j >= 1; i++, j--) {
    if (a[i] != a[j]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
