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;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) { return (b / gcd(a, b)) * a; }
void print() {}
void pLine() { cout << endl; }
template <typename T, typename... arg>
void print(T x, arg... ar) {
  cout << x;
  print(ar...);
}
const double PI = acos(-1);
const double eps = numeric_limits<double>::epsilon();
string str[] = {"", "", ""};
void add(char x) {
  switch (x) {
    case '0':
      str[0] += ".0";
      str[1] += "00";
      str[2] += "..";
      break;
    case '1':
      str[0] += "0.";
      str[1] += "..";
      str[2] += "..";
      break;
    case '2':
      str[0] += "0.";
      str[1] += "0.";
      str[2] += "..";
      break;
    case '3':
      str[0] += "00";
      str[1] += "..";
      str[2] += "..";
      break;
    case '4':
      str[0] += "00";
      str[1] += ".0";
      str[2] += "..";
      break;
    case '5':
      str[0] += "0.";
      str[1] += ".0";
      str[2] += "..";
      break;
    case '6':
      str[0] += "00";
      str[1] += "0.";
      str[2] += "..";
      break;
    case '7':
      str[0] += "00";
      str[1] += "00";
      str[2] += "..";
      break;
    case '8':
      str[0] += "0.";
      str[1] += "00";
      str[2] += "..";
      break;
    case '9':
      str[0] += ".0";
      str[1] += "0.";
      str[2] += "..";
      break;
  }
}
void sol() {
  string s;
  cin >> s;
  for (auto i : s) {
    add(i);
  }
  string a = str[0], b = str[1], c = str[2];
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  reverse(c.begin(), c.end());
  if (a != str[0]) return print("No");
  if (b != str[1]) return print("No");
  if (c != str[2]) return print("No");
  print("Yes");
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  sol();
  return 0;
}