Problem: 

Input

The only line of the input contains a string of digits. The length of the string is between 1 and 10, inclusive.

Output

Output "Yes" or "No".

Examples

Input

373


Output

Yes


Input

121


Output

No


Input

436


Output

Yes

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
char ch[20];
int n;
bool found;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  scanf("%s", ch + 1);
  n = strlen(ch + 1);
  for (int i = 1; i <= n / 2; i++) {
    if (ch[i] == '1' || ch[i] == '2')
      found = true;
    else if (ch[i] == '3') {
      if (ch[n - i + 1] != '3') found = true;
    } else if (ch[i] == '4') {
      if (ch[n - i + 1] != '6') found = true;
    } else if (ch[i] == '5') {
      if (ch[n - i + 1] != '9') found = true;
    } else if (ch[i] == '6') {
      if (ch[n - i + 1] != '4') found = true;
    } else if (ch[i] == '7') {
      if (ch[n - i + 1] != '7') found = true;
    } else if (ch[i] == '8') {
      if (ch[n - i + 1] != '0') found = true;
    } else if (ch[i] == '9') {
      if (ch[n - i + 1] != '5') found = true;
    } else if (ch[i] == '0') {
      if (ch[n - i + 1] != '8') found = true;
    }
  }
  if (n & 1) {
    if (ch[n / 2 + 1] != '3' && ch[n / 2 + 1] != '7') found = true;
  }
  if (found)
    puts("NO");
  else
    puts("YES");
  return 0;
}