#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d = 1, a = 10, e, g = 0;
  cin >> n;
  int i = 0, b, c = 0, f;
  while ((g = n % 10) == 0) {
    n /= 10;
  }
  f = n;
  while (d > 0) {
    d = n / a;
    a *= 10;
    i++;
    e = i;
  }
  for (int j = 1; j <= i; j++) {
    b = f % 10;
    f /= 10;
    c += b * double(pow(10.0, e - 1));
    e--;
  }
  if (c % n == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
