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.*;




public class Solution {


    Kattio io = new Kattio(System.in, System.out);
    String w;



    Solution() {
        w = io.getWord();
        int res = divisibleByEight();
        if(res == -1){
            io.println("NO");
        }
        else{
            io.println("YES\n"+res);
        }
        io.close();
    }

    private int divisibleByEight(){
        int len = w.length();

        for(int i=0; i<len; i++){
            int numb = Character.getNumericValue(w.charAt(i));
            if(numb%8 == 0) return numb;

            for(int j=i+1; j<len; j++){
                int numb2 = numb*10 + Character.getNumericValue(w.charAt(j));
                if(numb2%8 == 0) return numb2;

                for(int k=j+1; k<len; k++){
                    int numb3 = numb2*10 + Character.getNumericValue(w.charAt(k));
                    if(numb3%8 == 0) return numb3;
                }
            }
        }
        return -1;
    }


    public static void main(String[] args) {
        new Solution();
    }
}


/**
 * Simple yet moderately fast I/O routines.
 * <p>
 * Example usage:
 * <p>
 * Kattio io = new Kattio(System.in, System.out);
 * <p>
 * while (io.hasMoreTokens()) {
 * int n = io.getInt();
 * double d = io.getDouble();
 * double ans = d*n;
 * <p>
 * io.println("Answer: " + ans);
 * }
 * <p>
 * io.close();
 * <p>
 * <p>
 * Some notes:
 * <p>
 * - When done, you should always do io.close() or io.flush() on the
 * Kattio-instance, otherwise, you may lose output.
 * <p>
 * - The getInt(), getDouble(), and getLong() methods will throw an
 * exception if there is no more data in the input, so it is generally
 * a good idea to use hasMoreTokens() to check for end-of-file.
 *
 * @author: Kattis
 */

class Kattio extends PrintWriter {
    public Kattio(InputStream i) {
        super(new BufferedOutputStream(System.out));
        r = new BufferedReader(new InputStreamReader(i));
    }

    public Kattio(InputStream i, OutputStream o) {
        super(new BufferedOutputStream(o));
        r = new BufferedReader(new InputStreamReader(i));
    }

    public boolean hasMoreTokens() {
        return peekToken() != null;
    }

    public int getInt() {
        return Integer.parseInt(nextToken());
    }

    public double getDouble() {
        return Double.parseDouble(nextToken());
    }

    public long getLong() {
        return Long.parseLong(nextToken());
    }

    public String getWord() {
        return nextToken();
    }

    public String getLine() {
        try {
            return r.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }


    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) {
                e.printStackTrace();
            }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}