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.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

public class Main {
	public static int[] dp;
	public static void main(String[] args) throws NumberFormatException,
	IOException {
		ContestScanner in = new ContestScanner();
		List<int[]> list = new ArrayList<int[]>();
		int[] zero = {0};
		list.add(zero);
		out: for(int i=1; i<25; i++){
//			System.out.println(i*8);
			List<Integer> tmp = new ArrayList<Integer>();
			int val = i*8;
			while(val > 0){
				if(i > 1 && val%10 == 8 || val%10 == 0) continue out;
				tmp.add(val%10);
				val /= 10;
			}
			int[] t = new int[tmp.size()];
			for(int j=0; j<tmp.size(); j++){
				t[j] = tmp.get(j);
			}
			list.add(t);
			if(t.length == 3){
				for(int j=t[2]+2; j<10; j+=2){
					int[] sub = {
						t[0], t[1], j	
					};
					list.add(sub);
				}
			}
		}
//		for(int i=0; i<list.size(); i++){
//			int[] val = list.get(i);
//			for(int j=val.length-1; j>=0; j--){
//				System.out.print(val[j]);
//			}
//			System.out.println();
//		}
		char[] line = in.nextToken().toCharArray();
		int[] s = new int[line.length];
		for(int i=0; i<s.length; i++){
			s[s.length-i-1] = line[i]-'0';
		}
		int size = list.size();
		for(int i=0; i<size; i++){
			int state = 0;
			int[] val = list.get(i);
			for(int j=0; j<s.length; j++){
				if(s[j] == val[state]){
					state++;
					if(state >= val.length){
						out(val);
						return;
					}
				}
			}
		}
		System.out.println("NO");
	}
	
	public static void out(int[] val){
		System.out.println("YES");
		for(int i=val.length-1; i>=0; i--){
			System.out.print(val[i]);
		}
		System.out.println();
	}
}
class Node{
	int id;
	ArrayList<Node> edge = new ArrayList<Node>();
	public Node(int id) {
		this.id = id;
	}
	public void createEdge(Node node) {
		edge.add(node);
	}
}

class MyComp implements Comparator<int[]> {
	final int idx;
	public MyComp(int idx){
		this.idx = idx;
	}
	public int compare(int[] a, int[] b) {
		return a[idx] - b[idx];
	}
}

class Reverse implements Comparator<Integer> {
	public int compare(Integer arg0, Integer arg1) {
		return arg1 - arg0;
	}
}


class ContestWriter {
	private PrintWriter out;

	public ContestWriter(String filename) throws IOException {
		out = new PrintWriter(new BufferedWriter(new FileWriter(filename)));
	}

	public ContestWriter() throws IOException {
		out = new PrintWriter(System.out);
	}

	public void println(String str) {
		out.println(str);
	}
	
	public void println(Object obj) {
		out.println(obj);
	}

	public void print(String str) {
		out.print(str);
	}
	
	public void print(Object obj) {
		out.print(obj);
	}

	public void close() {
		out.close();
	}
}

class ContestScanner {
	private BufferedReader reader;
	private String[] line;
	private int idx;

	public ContestScanner() throws FileNotFoundException {
		reader = new BufferedReader(new InputStreamReader(System.in));
	}

	public ContestScanner(String filename) throws FileNotFoundException {
		reader = new BufferedReader(new InputStreamReader(new FileInputStream(
				filename)));
	}

	public String nextToken() throws IOException {
		if (line == null || line.length <= idx) {
			line = reader.readLine().trim().split(" ");
			idx = 0;
		}
		return line[idx++];
	}
	
	public String readLine() throws IOException{
		return reader.readLine();
	}

	public long nextLong() throws IOException, NumberFormatException {
		return Long.parseLong(nextToken());
	}

	public int nextInt() throws NumberFormatException, IOException {
		return (int) nextLong();
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}
}