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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author bibhuty(bibhuty.nit@gmail.com)
 */
public class Main{
	public static void main(String[] args){
		InputStream inputStream=System.in;
		OutputStream outputStream=System.out;
		InputReader in=new InputReader(inputStream);
		OutputWriter out=new OutputWriter(outputStream);
		Task550C_DivisiblityByEight solver=new Task550C_DivisiblityByEight();
		solver.solve(1,in,out);
		out.close();
	}

	static class Task550C_DivisiblityByEight{
		public void solve(int testNumber,InputReader in,OutputWriter out){
			String s=in.next();
			int n=s.length();
			int[] numbers=new int[n];
			for(int i=0;i<n;++i) numbers[i]=s.charAt(i)-'0';
			for(int i=0;i<n;++i){
				int num_i=numbers[i];
				if(num_i%8==0){
					out.printLine("YES");
					out.print(num_i);
					return;
				}
				for(int j=i+1;j<n;++j){
					int num_j=num_i*10+numbers[j];
					if(num_j%8==0){
						out.printLine("YES");
						out.print(num_j);
						return;
					}
					for(int k=j+1;k<n;++k){
						int num_k=num_j*10+numbers[k];
						if(num_k%8==0){
							out.printLine("YES");
							out.print(num_k);
							return;
						}
					}
				}
			}
			out.printLine("NO");
		}

	}

	static class OutputWriter{
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream){
			writer=new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer){
			this.writer=new PrintWriter(writer);
		}

		public void print(Object... objects){
			for(int i=0;i<objects.length;i++){
				if(i!=0){
					writer.print(' ');
				}
				writer.print(objects[i]);
			}
		}

		public void printLine(String s){
			writer.println(s);
		}

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

	}

	static class InputReader{
		private InputStream stream;
		private byte[] buf=new byte[1024];
		private int curChar;
		private int numChars;
		private InputReader.SpaceCharFilter filter;

		public InputReader(InputStream stream){
			this.stream=stream;
		}

		public int read(){
			if(numChars==-1) throw new InputMismatchException();
			if(curChar>=numChars){
				curChar=0;
				try{
					numChars=stream.read(buf);
				}catch(IOException e){
					throw new InputMismatchException();
				}
				if(numChars<=0) return -1;
			}
			return buf[curChar++];
		}

		public String readString(){
			int c=read();
			while(isSpaceChar(c)) c=read();
			StringBuilder res=new StringBuilder();
			do{
				res.appendCodePoint(c);
				c=read();
			}while(!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c){
			if(filter!=null)
				return filter.isSpaceChar(c);
			return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
		}

		public String next(){
			return readString();
		}

		public interface SpaceCharFilter{
			boolean isSpaceChar(int ch);

		}

	}
}