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:
/*
 * Code Author: Jayesh Udhani
 * Dhirubhai Ambani Institute of Information and Communication Technology (DA-IICT ,Gandhinagar)
 * 2nd Year ICT BTECH student
 */
// Botttom Up dynamic programming
import java.io.*;
import java.util.*;
public class dp
{
	private static void matrix(int[][] a)
	{
		for(int i=0;i<a.length;i++)
		{
			for(int j=0;j<a[0].length;j++)
				System.out.print(a[i][j]+" ");
			System.out.println();
		}
	}
	public static void main(String args[])
	{
		InputReader in = new InputReader(System.in);
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		//----------My Code Starts Here----------
		String s=in.next();
		int n=s.length(),i,j;
		char[] arr=s.toCharArray();
		int[][] dp=new int[n][8];
		int[][] ans=new int[n][8];
		dp[0][(arr[0]-0)%8]=1;
		ans[0][(arr[0]-0)%8]=Character.getNumericValue(arr[0]);
		for(i=1;i<n;i++)
		{
			dp[i][(arr[i]-0)%8]=1;
			ans[i][(arr[i]-0)%8]=Character.getNumericValue(arr[i]);
			for(j=0;j<8;j++)
			{
			//	dp[i][(j*10+(arr[i]-0))%8]=Math.max(dp[i][(j*10+(arr[i]-0))%8], dp[i-1][j]);
				if(dp[i-1][j]>dp[i][(j*10+Character.getNumericValue(arr[i]))%8])
				{
					dp[i][(j*10+Character.getNumericValue(arr[i]))%8]=dp[i-1][j];
					ans[i][(j*10+Character.getNumericValue(arr[i]))%8]=ans[i-1][j]*10+Character.getNumericValue(arr[i]);
				}
			//	dp[i][j]=Math.max(dp[i][j], dp[i-1][j]);
				if(dp[i-1][j]>dp[i][j])
				{
					dp[i][j]=dp[i-1][j];
					ans[i][j]=ans[i-1][j];
				}
			}
		}
	//	matrix(dp);	
	//	System.out.println();
	//	matrix(ans);
		for(i=0;i<n;i++)
		{
			if(dp[i][0]==1)
			{
				System.out.println("YES");
				System.out.println(ans[i][0]);
				return;
			}
		}
		System.out.println("NO");
		out.close();
		//---------------The End———————————————————

	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputstream) {
			reader = new BufferedReader(new InputStreamReader(inputstream));
			tokenizer = null;
		}

		public String nextLine(){
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}