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;
namespace IStream {
const int LLL = 1 << 15;
char buffer[LLL], *SSS, *TTT;
char Get_Char() {
  if (SSS == TTT) {
    TTT = (SSS = buffer) + fread(buffer, 1, LLL, stdin);
    if (SSS == TTT) return EOF;
  }
  return *SSS++;
}
int Getint() {
  char c;
  int re = 0, f = 1;
  for (c = Get_Char(); c < '0' || c > '9'; c = Get_Char())
    if (c == '-') f = -1;
  while (c >= '0' && c <= '9')
    re = (re << 1) + (re << 3) + (c - '0'), c = Get_Char();
  return re * f;
}
}  // namespace IStream
class OStream {
 private:
  static const int LLL = 1 << 15;
  char staack[21];
  int topp;
  char buffer[LLL], *SSS;

 public:
  OStream() { SSS = buffer; }
  void Putint(int x, int flag) {
    bool fl = false;
    if (flag == 1) staack[++topp] = ' ';
    if (flag == 2) staack[++topp] = '\n';
    if (x < 0) x = -x, fl = true;
    if (!x) staack[++topp] = '0';
    while (x) staack[++topp] = x % 10 + '0', x /= 10;
    if (fl) staack[++topp] = '-';
    while (topp) {
      if (SSS == buffer + LLL - 1) {
        fwrite(buffer, 1, SSS - buffer, stdout);
        SSS = buffer;
      }
      *SSS++ = staack[topp--];
    }
  }
  ~OStream() {
    fwrite(buffer, 1, SSS - buffer, stdout);
    *SSS = 0;
  }
} os;
using namespace IStream;
bool Map[21][2];
int main() {
  memset(Map, 0, sizeof(Map));
  string s;
  cin >> s;
  int Len = s.length();
  for (int i = 0; i < Len; i++) {
    int st = i * 2 - 1 + 2;
    if (s[i] == '0') Map[st][1] = Map[st + 1][0] = Map[st + 1][1] = 1;
    if (s[i] == '1') Map[st][0] = 1;
    if (s[i] == '2') Map[st][0] = Map[st][1] = 1;
    if (s[i] == '3') Map[st][0] = Map[st + 1][0] = 1;
    if (s[i] == '4') Map[st][0] = Map[st + 1][0] = Map[st + 1][1] = 1;
    if (s[i] == '5') Map[st][0] = Map[st + 1][1] = 1;
    if (s[i] == '6') Map[st][0] = Map[st + 1][0] = Map[st][1] = 1;
    if (s[i] == '7')
      Map[st][0] = Map[st][1] = Map[st + 1][0] = Map[st + 1][1] = 1;
    if (s[i] == '8') Map[st][0] = Map[st][1] = Map[st + 1][1] = 1;
    if (s[i] == '9') Map[st][1] = Map[st + 1][0] = 1;
  }
  for (int i = 1; i <= Len * 2; i++) {
    if (Map[i][0] != Map[Len * 2 - i + 1][0]) {
      cout << "No\n";
      return 0;
    }
    if (Map[i][1] != Map[Len * 2 - i + 1][1]) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}