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.awt.Point;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;

public class Main {
	//////
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	//////
	public static long modularExponentiation(long x, long n, long M) {
		long result = 1;
		while (n > 0) {
			if (n % 2 == 1)
				result = (result * x) % M;
			x = (x * x) % M;
			n = n / 2;
		}
		return result;
	}

	public static long modularExponentiation1(long x, long n) {
		long result = 1;
		while (n > 0) {
			if (n % 2 == 1)
				result = (result * x);
			x = (x * x);
			n = n / 2;
		}
		return result;
	}

	/////

	static public int fun(int num) {
		int prod = 1;
		while (num > 0) {
			if (num % 10 != 0) {
				prod = prod * (num % 10);
			}
			num = num / 10;
		}
		return prod;
	}

	public static boolean dfs(int x, int find, boolean[] visited, int[][] matrix) {

		boolean ans = false;
		if (x == find) {
			ans = true;
			return true;
		}
		for (int i = 0; i < 26; i++) {
			if (visited[i] == false && matrix[x][i] == 1) {
				visited[i] = true;
				ans = ans || dfs(i, find, visited, matrix);
			}
		}

		return ans;
	}

	static int lis(int arr[], int n, int k, int b) {
		int lis[] = new int[n];
		int i, j, max = 0;

		/* Initialize LIS values for all indexes */
		for (i = 0; i < n; i++)
			lis[i] = 1;

		/* Compute optimized LIS values in bottom up manner */
		for (i = 1; i < n; i++)
			for (j = 0; j < i; j++)
				if (arr[i] >= k * arr[j] + b && lis[i] < lis[j] + 1)
					lis[i] = lis[j] + 1;

		/* Pick maximum of all LIS values */
		for (i = 0; i < n; i++)
			if (max < lis[i])
				max = lis[i];

		return max;
	}
	
	public static double fun(int n,int r){
		double ans=1;
		

		for(int i=1;i<=n;i++){
			ans=ans*i;
		}
		
		for(int i=1;i<=n-r;i++){
			ans=ans/i;
		}
		for(int i=1;i<=r;i++){
			ans=ans/i;
		}
		
		return ans;
	}
	

	public static void main(String[] args) throws IOException {

		FastReader scan = new FastReader();
		PrintWriter pw = new PrintWriter(System.out);

//		int N=scan.nextInt();
//		int U=scan.nextInt();
//		int flag=0;
//		int[] A=new int[N];
//		for(int i=0;i<N;i++){
//			A[i]=scan.nextInt();
//			if(i>=2){
//				if(A[i]-A[i-2]<=U){
//					flag=1;
//				}
//			}
//		}
//		
////		
//		if(flag==0){
//			System.out.println("-1");
//			return;
//		}
//		
//		//int i=0,j=2;
//		//int sum=A[2]-A[0];
//		double e=0;
//		//e=Math.max((double)(A[j]-A[i+1])/(double)(A[j]-A[i]),e);
//		for(int i=0;i<N-2;i++){
//			int j=i+2;
//			while(j!=N&&A[j]-A[i]<=U){
//				j++;
//			}
//			j--;
////			if(A[j]-A[i]>U){
////				continue;
////			}
//			e=Math.max((double)(A[j]-A[i+1])/(double)(A[j]-A[i]),e);
//		}
//		
//		
//		pw.println(e);
		
		String str=scan.next();
		int N=str.length();
		char[] A=str.toCharArray();
		for(int i=0;i<N;i++){
			if(A[i]=='0'){
				System.out.println("YES");
				System.out.println("0");
				return;
			}
			if(A[i]=='8'){
				System.out.println("YES");
				System.out.println("8");
				return;
			}
		}
		for(int i=0;i<N-1;i++){
			for(int j=i+1;j<N;j++){
				if((10*((char)A[i]-48)+((char)A[j]-48))%8==0){
					System.out.println("YES");
					System.out.println((10*((char)A[i]-48)+((char)A[j]-48)));
					return;
				}
			}
		}
		
		for(int i=0;i<N-2;i++){
			for(int j=i+1;j<N-1;j++){
				for(int k=j+1;k<N;k++){
				if((100*((char)A[i]-48)+10*((char)A[j]-48)+((char)A[k]-48))%8==0){
					System.out.println("YES");
					System.out.println((100*((char)A[i]-48)+10*((char)A[j]-48)+((char)A[k]-48)));
					return;
				}
				}	
			}
		}
		
		System.out.println("NO");
		pw.close();
	}
}