Problem: You are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn't contain leading zeroes.

Your task is to determine if it is possible in this case to remove some of the digits (possibly not remove any digit at all) so that the result contains at least one digit, forms a non-negative integer, doesn't have leading zeroes and is divisible by 8. After the removing, it is forbidden to rearrange the digits.

If a solution exists, you should print it.

Input

The single line of the input contains a non-negative integer n. The representation of number n doesn't contain any leading zeroes and its length doesn't exceed 100 digits. 

Output

Print "NO" (without quotes), if there is no such way to remove some digits from number n. 

Otherwise, print "YES" in the first line and the resulting number after removing digits from number n in the second line. The printed number must be divisible by 8.

If there are multiple possible answers, you may print any of them.

Examples

Input

3454


Output

YES
344


Input

10


Output

YES
0


Input

111111


Output

NO

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.Arrays;
import java.util.InputMismatchException;

public class C {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskS solver = new TaskS();
            solver.solve(1, in, out);
        out.close();
    }


    private static class TaskS {

        public void solve(int testNumber, FastScanner in, FastPrinter out) {
            char[] c = in.readLine().toCharArray();

            if (c.length <= 10) {
                if (Long.valueOf(new String(c)) % 8 == 0) {
                    out.println("YES");
                    out.println(c);
                    return;
                }
            }
            for (int i = c.length -1; i >= 0; i--) {
                if (toInt(c[i]) % 8 == 0 ) {
                    out.println("YES");
                    out.println(toInt(c[i]));
                    return;
                }
                for (int j = i-1; j>=0; j--) {
                    if (toInt(c[j],c[i]) % 8 == 0 ) {
                        out.println("YES");
                        out.println(toInt(c[j],c[i]));
                        return;
                    }
                    for (int k = j-1; k>=0; k--) {
                        if (toInt(c[k],c[j],c[i]) % 8 == 0 ) {
                            out.println("YES");
                            out.println(toInt(c[k],c[j],c[i]));
                            return;
                        }
                    }
                }
            }
            out.println("NO");
            return;

        }

        private static int toInt(char c) {
            return  c-'0';
        }

        private static int toInt(char b,char c) {
            return  (b-'0')*10 + c-'0';
        }

        private static int toInt(char a,char b, char c) {
            return  (a-'0') * 100 + (b-'0')*10 + c-'0';
        }

        private static int count (long a) {
            char[] cr = String.valueOf(a).toCharArray();
            long news = 0;
            for (char c : cr) {
                news += (c-'0');
            }
            if (news < 10) {
                return (int) news;
            }
            else {
                return count(news);
            }
        }

    }

    private static class FastScanner extends BufferedReader {

        public FastScanner(InputStream is) {
            super(new InputStreamReader(is));
        }

        public int read() {
            try {
                return super.read();
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }

        static boolean isWhiteSpace(int c) {
            return c >= 0 && c <= 32;
        }

        public int nextInt() {
            int c = read();
            while (isWhiteSpace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int ret = 0;
            while (c >= 0 && !isWhiteSpace(c)) {
                if (c < '0' || c > '9') {
                    throw new NumberFormatException("digit expected " + (char) c
                            + " found");
                }
                ret = ret * 10 + c - '0';
                c = read();
            }
            return ret * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isWhiteSpace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long ret = 0;
            while (c >= 0 && !isWhiteSpace(c)) {
                if (c < '0' || c > '9') {
                    throw new NumberFormatException("digit expected " + (char) c
                            + " found");
                }
                ret = ret * 10 + c - '0';
                c = read();
            }
            return ret * sgn;
        }

        public String readLine() {
            try {
                return super.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public int[] readIntArray(int n) {
            int[] ret = new int[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextInt();
            }
            return ret;
        }
    }

    private static class FastPrinter extends PrintWriter {
        public FastPrinter(OutputStream out) {
            super(out);
        }
    }
}