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 00:19:04        
/*==========================================================================*/
import java.io.*;
import java.util.*;

public class C {
	
	public static void main(String[] args) throws IOException {
		/*
    in.ini();
    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
    */
    long startTime = System.nanoTime();
    int t = 1;//in.nextInt(), T = 1;  
		outer : while(t-->0) { 
      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';
      //one digit
      for(int i : a){
      	if(i==8||i==0){
      		out.println("YES");
      		out.println(i);
      		continue outer;
      	}
      }
      //two digit
      for(int i=0;i<n;i++){
				for(int j=i+1;j<n;j++){
					if((a[i]*10+a[j])%8==0){
						out.println("YES");
						out.println(a[i]*10+a[j]);
						continue outer;
					}
				}
      }
      //three digit xyz [ x-->odd and (y*10+z)mod8-->4 ]
      int odd = n;
      for(int i=0;i<n;i++){
      	if(a[i]%2==1){
      		odd = i; break;
      	}
      }
      for(int i=odd+1;i<n;i++){
      	for(int j=i+1;j<n;j++){
      		if((a[i]*10+a[j])%8==4){
      			out.println("YES");
      			out.println(a[odd]*100+a[i]*10+a[j]);
      			continue outer;
      		}
      	}
      }
      out.println("NO");
   		//out.println("Case #"+T+": "+ans); T++;
    }
    /*
    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); 	
	}
}