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.util.Scanner;

public class DivisibilityByEight{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String num = in.next();
		if (num.indexOf("8") != -1){
			System.out.println("YES\n8");
			return;
		}else if (num.indexOf("0") != -1){
			System.out.println("YES\n0");
			return;
		}else{
			int[] index = new int[10];
			//find _6
			index[6] = num.lastIndexOf("6");
			if (index[6] != -1){
				//look for 1, 5, or 9
				if (num.lastIndexOf("1", index[6]-1) != -1){
					System.out.println("YES\n16"); return;
				}
				if (num.lastIndexOf("5", index[6]-1) != -1){
					System.out.println("YES\n56"); return;
				}
				if (num.lastIndexOf("9", index[6]-1) != -1){
					System.out.println("YES\n96"); return;
				}
				//look for 33, 37, 73, 77
				index[3] = num.lastIndexOf("3", index[6]-1);
				if (index[3] != -1){
					if (num.lastIndexOf("3", index[3]-1)!=-1){System.out.println("YES\n336"); return;}
					if (num.lastIndexOf("7", index[3]-1)!=-1){System.out.println("YES\n736"); return;}
				}
				index[7] = num.lastIndexOf("7", index[6]-1);
				if (index[7] != -1){
					if (num.lastIndexOf("3", index[7]-1)!=-1){System.out.println("YES\n376"); return;}
					if (num.lastIndexOf("7", index[7]-1)!=-1){System.out.println("YES\n776"); return;}
				}
			}
			//find _0
			index[0] = num.lastIndexOf("0");
			if (index[0] != -1 && num.lastIndexOf("4", index[0]-1) != -1){System.out.println("YES\n40"); return;}
			//find _2
			index[2] = num.lastIndexOf("2");
			if (index[2] != -1){
				//look for 3 or 7
				if (num.lastIndexOf("3", index[2]-1) != -1){
					System.out.println("YES\n32"); return;
				}
				if (num.lastIndexOf("7", index[2]-1) != -1){
					System.out.println("YES\n72"); return;
				}
				//look for 11, 15, 19, 51, 55, 59, 91, 95, 99
				index[1] = num.lastIndexOf("1", index[2]-1);
				if (index[1] != -1){
					if (num.lastIndexOf("1", index[1]-1)!=-1){System.out.println("YES\n112"); return;}
					if (num.lastIndexOf("5", index[1]-1)!=-1){System.out.println("YES\n512"); return;}
					if (num.lastIndexOf("9", index[1]-1)!=-1){System.out.println("YES\n912"); return;}
				}
				index[5] = num.lastIndexOf("5", index[2]-1);
				if (index[5] != -1){
					if (num.lastIndexOf("1", index[5]-1)!=-1){System.out.println("YES\n152"); return;}
					if (num.lastIndexOf("5", index[5]-1)!=-1){System.out.println("YES\n552"); return;}
					if (num.lastIndexOf("9", index[5]-1)!=-1){System.out.println("YES\n952"); return;}
				}
				index[9] = num.lastIndexOf("9", index[2]-1);
				if (index[9] != -1){
					if (num.lastIndexOf("1", index[9]-1)!=-1){System.out.println("YES\n192"); return;}
					if (num.lastIndexOf("5", index[9]-1)!=-1){System.out.println("YES\n592"); return;}
					if (num.lastIndexOf("9", index[9]-1)!=-1){System.out.println("YES\n992"); return;}
				}
			}
			//look for _4
			index[4] = num.lastIndexOf("4");
			if (index[4] != -1){
				//look for 2 or 6
				if (num.lastIndexOf("2", index[4]-1) != -1){
					System.out.println("YES\n24"); return;
				}
				if (num.lastIndexOf("6", index[4]-1) != -1){
					System.out.println("YES\n64"); return;
				}
				//look for 10, 14, 30, 34, 50, 54, 70, 74, 90, 94
				index[0] = num.lastIndexOf("0", index[4]-1);
				if (index[0] != -1){
					if (num.lastIndexOf("1", index[0]-1)!=-1){System.out.println("YES\n104"); return;}
					if (num.lastIndexOf("3", index[0]-1)!=-1){System.out.println("YES\n304"); return;}
					if (num.lastIndexOf("5", index[0]-1)!=-1){System.out.println("YES\n504"); return;}
					if (num.lastIndexOf("7", index[0]-1)!=-1){System.out.println("YES\n704"); return;}
					if (num.lastIndexOf("9", index[0]-1)!=-1){System.out.println("YES\n904"); return;}
				}
				index[4] = num.lastIndexOf("4", index[4]-1);
				if (index[4] != -1){
					if (num.lastIndexOf("1", index[4]-1)!=-1){System.out.println("YES\n144"); return;}
					if (num.lastIndexOf("3", index[4]-1)!=-1){System.out.println("YES\n344"); return;}
					if (num.lastIndexOf("5", index[4]-1)!=-1){System.out.println("YES\n544"); return;}
					if (num.lastIndexOf("7", index[4]-1)!=-1){System.out.println("YES\n744"); return;}
					if (num.lastIndexOf("9", index[4]-1)!=-1){System.out.println("YES\n944"); return;}
				}
			}
			System.out.println("NO");
		}
	}
}