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.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;


public class CF550C {
	static StringBuilder out;
	static int mem[][];
	static int n;
	static String line;
	
	public static void main(String[] args) throws IOException {
		MyScanner sc = new MyScanner(System.in);
		line = sc.nextLine();
		n = line.length();
		mem = new int[8][line.length()];
		for (int i = 0; i < 8; i++) {
			Arrays.fill(mem[i], -1);
		}
		if(dp(0, 0) == 1){
			System.out.println("YES");
			out = new StringBuilder();
			output(0, 0);
			System.out.println(out);
		}else
			System.out.println("NO");
	}

	private static int dp(int mod, int i) {
		if(i == n)
			return 0;
		if(mem[mod][i] != -1)
			return mem[mod][i];
		int cur = mod*10 + (line.charAt(i)-'0');
		if(cur % 8 == 0)
			return mem[mod][i] = 1;
		else
			return mem[mod][i] = or(dp(mod, i+1), dp(cur%8, i+1));
	}

	private static void output(int mod, int i) {
		if(i == n)
			return;
		int cur = mod*10 + (line.charAt(i)-'0');
		if(cur % 8 == 0){
			out.append(line.charAt(i));
			return;
		}
		int optimal = mem[mod][i];
		int optimal2 = dp(cur%8, i+1);
		if(optimal == optimal2){
			out.append(line.charAt(i));
			output(cur%8, i+1);
		}
		else
			output(mod, i+1);
	}

	private static int or(int dp, int dp2) {
		return (dp == 1 || dp2 == 1)?1:0;
	}

	static class MyScanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public MyScanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public MyScanner(String s) throws FileNotFoundException{br = new BufferedReader(new FileReader(new File(s)));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}
}