#include <bits/stdc++.h>
using namespace std;
long long int mod = 1000000007;
long long int removeZero(long long int x) {
  while (x % 10 == 0) {
    x = x / 10;
  }
  return x;
}
vector<int> digi(long long int x) {
  vector<int> di;
  while (x) {
    int y = x % 10;
    di.push_back(y);
    x = x / 10;
  }
  return di;
}
bool solver(long long int n) {
  long long int a = removeZero(n);
  vector<int> v = digi(a);
  int i, j;
  i = 0;
  j = v.size() - 1;
  while (i <= j) {
    if (v[i] != v[j]) {
      return false;
    }
    i++;
    j--;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t, n;
  t = 1;
  while (t--) {
    cin >> n;
    if (solver(n)) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
