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:
/*==========================================================================
*   	AUTHOR:    RonWonWon
*   	CREATED:   09.06.2021 01:52:53        
/*==========================================================================*/
import java.io.*;
import java.util.*;

public class C2 {
	
	public static void main(String[] args) throws IOException {
		/*
    in.ini();
    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
    */
    char ch[] = in.next().toCharArray();
    int n = ch.length;
    int a[] = new int[n];
    for(int i=0;i<n;i++) a[i] = ch[i] - '0';
    boolean dp[][] = new boolean[n+1][8];
    int prev[][] = new int[n+1][8];
    for(int i=0;i<=n;i++) Arrays.fill(prev[i],-1);
    for(int i=1;i<=n;i++){
    	dp[i][a[i-1]%8] = true;
    	for(int j=0;j<8;j++){
    		if(!dp[i-1][j]) continue;
    		dp[i][j] = dp[i-1][j];
  			dp[i][(j*10+a[i-1])%8] = true;
  			prev[i][(j*10+a[i-1])%8] = prev[i][j] = j;
    	}
    }
    int start = 0;
    for(int i=1;i<=n;i++){
    	if(dp[i][0]){
    		start = i; break;
    	}
    }
    if(start!=0){
    	ArrayList<Integer> ans = new ArrayList<>();
    	out.println("YES");
    	int p = 0;
    	int ind = start;
    	while(true){
    		if(prev[ind][p]!=p){
    			ans.add(0,a[ind-1]);
    		}
    		if(prev[ind][p]==-1){
    			break;
    		}
    		p = prev[ind][p];
    		ind--;
    	}
    	for(int i : ans) out.print(i);
    }
    else out.println("NO");
    /*
    startTime = System.nanoTime() - startTime;
    System.err.println("Time: "+(startTime/1000000));
    */
    out.flush();
	}
	
	static FastScanner in = new FastScanner();
  static PrintWriter out = new PrintWriter(System.out);
	static int oo = 1_000_000_000;
	
	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		
		void ini() throws FileNotFoundException {
			br = new BufferedReader(new FileReader("input.txt"));
		}
		
		String next() {
			while(!st.hasMoreTokens())
				try { st = new StringTokenizer(br.readLine()); }
				catch(IOException e) {}
			return st.nextToken();
		}
		
		String nextLine(){
			try{ return br.readLine(); } 
			catch(IOException e) { } return "";
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		int[] readArray(int n) {
			int a[] = new int[n];
			for(int i=0;i<n;i++) a[i] = nextInt();
			return a;
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
		
		long[] readArrayL(int n) {
			long a[] = new long[n];
			for(int i=0;i<n;i++) a[i] = nextLong();
			return a;
		}
		
		double nextDouble() {
			return Double.parseDouble(next());
		}
		
		double[] readArrayD(int n) {
			double a[] = new double[n];
			for(int i=0;i<n;i++) a[i] = nextDouble();
			return a;
		}
	}

	static final Random random = new Random();

	static void ruffleSort(int[] a){
		int n = a.length;
		for(int i=0;i<n;i++){
			int j = random.nextInt(n), temp = a[j];
			a[j] = a[i]; a[i] = temp;
		}
		Arrays.sort(a); 	
	}
	
	static void ruffleSortL(long[] a){
		int n = a.length;
		for(int i=0;i<n;i++){
			int j = random.nextInt(n);
			long temp = a[j];
			a[j] = a[i]; a[i] = temp;
		}
		Arrays.sort(a); 	
	}
}