#include <bits/stdc++.h>
using namespace std;
char s[15];
bool chk(char a, char b) {
  if (a == '3' && b == '3') return true;
  if (a == '4' && b == '6') return true;
  if (a == '5' && b == '9') return true;
  if (a == '6' && b == '4') return true;
  if (a == '7' && b == '7') return true;
  if (a == '8' && b == '0') return true;
  if (a == '9' && b == '5') return true;
  if (a == '0' && b == '8') return true;
  return false;
}
int main() {
  cin >> s;
  for (int i = 0, j = strlen(s) - 1; i <= j; i++, j--)
    if (!chk(s[i], s[j])) {
      puts("No");
      return 0;
    }
  puts("Yes");
  return 0;
}
