#include <bits/stdc++.h>
using namespace std;
char a[100];
int ans = 1, n;
int main() {
  scanf("%s", a);
  int len = strlen(a);
  for (int i = 0; i < len; i++) {
    if (a[i] == '1') ans = 0;
    if (a[i] == '2') ans = 0;
    if (a[i] == '3' && a[len - i - 1] != '3') ans = 0;
    if (a[i] == '4' && a[len - i - 1] != '6') ans = 0;
    if (a[i] == '5' && a[len - i - 1] != '9') ans = 0;
    if (a[i] == '6' && a[len - i - 1] != '4') ans = 0;
    if (a[i] == '7' && a[len - i - 1] != '7') ans = 0;
    if (a[i] == '8' && a[len - i - 1] != '0') ans = 0;
    if (a[i] == '9' && a[len - i - 1] != '5') ans = 0;
    if (a[i] == '0' && a[len - i - 1] != '8') ans = 0;
  }
  puts(ans ? "Yes" : "No");
  return 0;
}
