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.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }
    static class Solver {
        public void solve(InputReader in, PrintWriter out) {
            String s = in.next();
            String[][] numbers = {
                    {"0*", "**", "00"},
                    {"*0", "00", "00"},
                    {"*0", "*0", "00"},
                    {"**", "00", "00"},
                    {"**", "0*", "00"},
                    {"*0", "0*", "00"},
                    {"**", "*0", "00"},
                    {"**", "**", "00"},
                    {"*0", "**", "00"},
                    {"0*", "*0", "00"}};
            for (int i = 0; i < s.length(); ++i) {
                int n = s.charAt(i) - '0';
                for (int j = 0; j < 3; ++j) {
                    if (!numbers[n][j].equals(reverse(numbers[s.charAt(s.length() - i - 1) - '0'][j]))) {
                        out.println("NO");
                        return;
                    }
                }
            }
            out.println("YES");
        }
        static String reverse(String s) {
            String rev = "";
            for (int i = 0; i < s.length(); ++i) {
                rev += s.charAt(s.length() - i - 1);
            }
            return rev;
        }
    } // wubba lubba dub dub
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreElements()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}