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;
const int mod = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 123;
const int N = 1e6 + 123;
const int INF = 1e9 + 1;
const long long INFL = 3e18 + 1;
const double pi = acos(-1.0);
const double eps = 1e-9;
string s;
inline void boost() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
inline void solve() {
  boost();
  cin >> s;
  for (int i = 0; i < s.size() - 1 - i; i++) {
    if (s[i] == '1') cout << "No", exit(0);
    if (s[i] == '2') cout << "No", exit(0);
    if (s[i] == '3' && s[s.size() - 1 - i] != '3') cout << "No", exit(0);
    if (s[i] == '4' && s[s.size() - 1 - i] != '6') cout << "No", exit(0);
    if (s[i] == '5' && s[s.size() - 1 - i] != '9') cout << "No", exit(0);
    if (s[i] == '6' && s[s.size() - 1 - i] != '4') cout << "No", exit(0);
    if (s[i] == '7' && s[s.size() - 1 - i] != '7') cout << "No", exit(0);
    if (s[i] == '8' && s[s.size() - 1 - i] != '0') cout << "No", exit(0);
    if (s[i] == '9' && s[s.size() - 1 - i] != '5') cout << "No", exit(0);
    if (s[i] == '0' && s[s.size() - 1 - i] != '8') cout << "No", exit(0);
  }
  if (s.size() & 1) {
    int i = (int)s.size() / 2;
    if (s[i] != '3' && s[i] != '7') {
      cout << "No", exit(0);
    }
  }
  cout << "Yes";
}
int main() { solve(); }