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 static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.util.*;
import java.io.*;

public class B
{
    static int n;
    static int[] arr;
    static char[] s;
    public static void main(String[] args) throws IOException
    {
        f = new Flash();
        out = new PrintWriter(System.out);
        
        int T = 1; //ni();
        for(int tc = 1; tc <= T; tc++){
        	s = nc(); n = s.length; fn();
        }
        
        out.flush(); out.close();
    }
    
    //solve this next
    //https://codeforces.com/contest/1510/problem/D
    
    //see official tutorial for this
    static void fn()
    {
        boolean[][] dp = new boolean[n][8];
        boolean[][] taken = new boolean[n][8];
        int[][] prev = new int[n][8];
        for(int i = 0; i < n; i++) Arrays.fill(prev[i], -1);
        dp[0][(s[0]-'0')%8] = true;
        taken[0][(s[0]-'0')%8] = true;
        for(int i = 1; i < n; i++) {
        	dp[i][(s[i]-'0')%8] = true; //starting a new number here.
			taken[i][(s[i]-'0')%8] = true;
        	for(int j = 0; j < 8; j++) {
        		if(dp[i-1][j]) {
        			dp[i][(j*10+(s[i]-'0'))%8] = true;
        			taken[i][(j*10+(s[i]-'0'))%8] = true;
        			prev[i][(j*10+(s[i]-'0'))%8] = j;
        			
        			dp[i][j] = dp[i-1][j];
            		prev[i][j] = j;
        		}
        	}
        	
        	
        }
        //for(int i = 0; i < n; i++) sop(Arrays.toString(dp[i]));
        if(!dp[n-1][0]) {sop("NO");}
        else {
        	sop("YES");
        	int curI = n-1, curJ = 0;
        	StringBuilder sb = new StringBuilder();
        	while(true) {
        		if(prev[curI][curJ] != curJ) sb.append(s[curI]);
        		if(prev[curI][curJ] == -1) break;
        		curJ = prev[curI][curJ];
        		curI -= 1;
        	}
        	
        	sb.reverse();
        	sop(sb);
        }
    }
    
    static Flash f;
    static PrintWriter out;
    static final long mod = (long)1e9+7;
    static final long inf = (long)1e18;
    static final int _inf = Integer.MAX_VALUE;
    static final int maxN = (int)1e6;
    static long[] fact, inv;
    
    static class cpr implements Comparator<int[]>{
    	public int compare(int[] a, int[] b) {
    		return Integer.compare(a[0], b[0]);
    	}
    }
    
    static void sort(int[] a){
        List<Integer> A = new ArrayList<>();
        for(int i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static void sort(long[] a){
        List<Long> A = new ArrayList<>();
        for(long i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }
    
    static void print(int[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        sop(sb);
    }
    
    static void print(long[] a){
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < a.length; i++) sb.append(a[i] + " ");
        sop(sb);
    }
    
    static int swap(int itself, int dummy){return itself;}
    static long swap(long itself, long dummy){return itself;}
    static char swap(char itself, char dummy){return itself;}
    static void sop(Object o){out.println(o);}
    static int ni(){return f.ni();}
    static long nl(){return f.nl();}
    static double nd(){return f.nd();}
    static String next(){return f.next();}
    static String ns(){return f.ns();}
    static char[] nc(){return f.nc();}
    static int[] arr(int len){return f.arr(len);}
    static int gcd(int a, int b){if(b == 0) return a; return gcd(b, a%b);}
    static long gcd(long a, long b){if(b == 0) return a; return gcd(b, a%b);}
    static int lcm(int a, int b){return (a*b)/gcd(a, b);}
    static long lcm(long a, long b){return (a*b)/gcd(a, b);}
    
    static class Flash
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        
        String next(){
            while(!st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(IOException e){
                    e.printStackTrace();
                }
            }
            
            return st.nextToken();
        }
        
        String ns(){
            String s = new String();
            try{
                s = br.readLine().trim();
            }catch(IOException e){
                e.printStackTrace();
            }
            
            return s;
        }
        
        int[] arr(int n){
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = ni();
            return a;
        }
        
        char[] nc(){return ns().toCharArray();}
        int ni(){return Integer.parseInt(next());}
        long nl(){return Long.parseLong(next());}
        double nd(){return Double.parseDouble(next());}
    }
}