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 JAVA):

Solution:

import java.io.*;

public class Main {

    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String ch = in.next();
        if (ch.length() == 1 && (ch.equals("2") || ch.equals("8") || ch.equals("9")
                || ch.equals("0") || ch.equals("5") || ch.equals("4") || ch.equals("6") || ch.equals("1"))) {
            out.println("No");
            out.close();
            return;
        }
        int mid = (ch.length() % 2 == 0) ? ch.length() / 2 - 1 : ch.length() / 2;
        if (ch.contains("2") || ch.contains("1")) {
            out.println("No");
        } else {
            boolean test = true;
            for (int i = 0; i < mid; i++) {
                
                    if (ch.charAt(i) == '3') {
                        if (ch.charAt(ch.length()-1-i) != '3') {
                            test = false;
                        }
                    } else if (ch.charAt(i) == '7') {
                        if (ch.charAt(ch.length()-1-i) != '7') {
                            test = false;

                        }
                    } else if (ch.charAt(i) == '4') {
                        if (ch.charAt(ch.length()-1-i) != '6') {
                            test = false;

                        }
                    } else if (ch.charAt(i) == '6') {
                        if (ch.charAt(ch.length()-1-i) != '4') {
                            test = false;

                        }
                    } else if (ch.charAt(i) == '5') {
                        if (ch.charAt(ch.length()-1-i) != '9') {
                            test = false;

                        }
                    } else if (ch.charAt(i) == '9') {
                        if (ch.charAt(ch.length()-1-i) != '5') {
                            test = false;

                        }
                    } else if (ch.charAt(i) == '8') {
                        if (ch.charAt(ch.length()-1-i) != '0') {
                            test = false;

                        }
                    } else if (ch.charAt(i) == '0') {
                        if (ch.charAt(ch.length()-1-i) != '8') {
                            test = false;

                        }
                    }
                }
            
            if (test) {
                out.println("Yes");
            } else {
                out.println("No");
            }
        }
        out.close();
    }

    static class FastScanner {

        private BufferedReader in;
        private String[] line;
        private int index;
        private int size;

        public FastScanner(InputStream in) throws IOException {
            this.in = new BufferedReader(new InputStreamReader(in));
            init();
        }

        public FastScanner(String file) throws FileNotFoundException {
            this.in = new BufferedReader(new FileReader(file));
        }

        private void init() throws IOException {
            line = in.readLine().split(" ");
            index = 0;
            size = line.length;
        }

        public int nextInt() throws IOException {
            if (index == size) {
                init();
            }
            return Integer.parseInt(line[index++]);
        }

        public long nextLong() throws IOException {
            if (index == size) {
                init();
            }
            return Long.parseLong(line[index++]);
        }

        public float nextFloat() throws IOException {
            if (index == size) {
                init();
            }
            return Float.parseFloat(line[index++]);
        }

        public double nextDouble() throws IOException {
            if (index == size) {
                init();
            }
            return Double.parseDouble(line[index++]);
        }

        public String next() throws IOException {
            if (index == size) {
                init();
            }
            return line[index++];
        }

        public String nextLine() throws IOException {
            if (index == size) {
                init();
            }
            StringBuilder sb = new StringBuilder();
            for (int i = index; i < size; i++) {
                sb.append(line[i]).append(" ");
            }
            return sb.toString();
        }

        private int[] nextIntArray(int n) throws IOException {
            int[] tab = new int[n];
            for (int i = 0; i < tab.length; i++) {
                tab[i] = nextInt();
            }
            return tab;
        }

    }

}