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.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
 
public class Prac {	 
	public static void main(String[] args) throws IOException {
		BufferInput in = new BufferInput();
		String s = in.nextString();
		if(s.length()<=2) {
			if(s.length()==1) {
				if(Integer.parseInt(s)%8==0) {
					System.out.println("YES");
					System.out.println(s);
					return;
				}
				else {
					System.out.println("NO");
					return;
				}
			}
			else {
				if(Integer.parseInt(s)%8==0) {
					System.out.println("YES");
					System.out.println(s);
					return;
				}
				else if((s.charAt(0)-'0')%8==0) {
					System.out.println("YES");
					System.out.println(s.charAt(0));
					return;
				}
				else if((s.charAt(1)-'0')%8==0) {
					System.out.println("YES");
					System.out.println(s.charAt(1));
					return;
				}
				else {
					System.out.println("NO");
					return;
				}
			}
		}
		else {
			for(int i=0;i<s.length()-2;i++) {
				int a = s.charAt(i)-'0';
				for(int j=i+1;j<s.length()-1;j++) {
					int b = s.charAt(j)-'0';
					for(int k=j+1;k<s.length();k++) {				
						int c = s.charAt(k)-'0';
						if((a*100+b*10+c)%8==0) {
							System.out.println("YES");
							System.out.println((a*100+b*10+c));
							return;
						}
						else if((a*10+b)%8==0) {
							System.out.println("YES");
							System.out.println(a*10+b);
							return;
						}
						else if((a*10+c)%8==0) {
							System.out.println("YES");
							System.out.println(a*10+c);
							return;
						}
						else if((b*10+c)%8==0) {
							System.out.println("YES");
							System.out.println(b*10+c);
							return;
						}
						else if((a)%8==0) {
							System.out.println("YES");
							System.out.println(a);
							return;
						}
						else if(b%8==0) {
							System.out.println("YES");
							System.out.println(b);
							return;
						}
						else if(c%8==0) {
							System.out.println("YES");
							System.out.println(c);
							return;
						}
					}
				}
			}
			System.out.println("NO");
		}
	}
static class BufferInput {
		final private int BUFFER_SIZE = 1 << 16;
		
		private DataInputStream din;
		
		private byte[] buffer;
		
		private int bufferPointer, bytesRead;
		
		public BufferInput() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}
 
		public BufferInput(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}
 
		/**
		 * Reads the input bytes until it encounters a new line char.
		 * @return
		 * @throws IOException
		 */
		public String readLine() throws IOException {
			byte[] buf = new byte[64];
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}
		
		/**
		 * 
		 * @return
		 * @throws IOException
		 */
		public String nextString() throws IOException{
			
			// Skip all whitespace characters from the stream
			byte c = read();
			while(Character.isWhitespace(c)){
				c = read();
			}
			
			StringBuilder builder = new StringBuilder();
			builder.append((char)c);
			c = read();
			while(!Character.isWhitespace(c)){
				builder.append((char)c);
				c = read();
			}
			
			return builder.toString();
		}
			
		/**
		 * Reads an integer value.
		 * @return
		 * @throws IOException
		 */
		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
 
			if (neg)
				return -ret;
			return ret;
		}
		
 
		/**
		 * Reads an array of integers.
		 * @return
		 * @throws IOException
		 */
		public int[] nextIntArray(int n) throws IOException {
			int arr[] = new int[n];
			for(int i = 0; i < n; i++){
				arr[i] = nextInt();
			}
			return arr;
		}
 
 
		/**
		 * Reads a long value.
		 * @return
		 * @throws IOException
		 */
		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}
		
		
		/**
		 * Reads an array of long integers.
		 * @return
		 * @throws IOException
		 */
		public long[] nextLongArray(int n) throws IOException {
			long arr[] = new long[n];
			for(int i = 0; i < n; i++){
				arr[i] = nextLong();
			}
			return arr;
		}
		
		/**
		 * 
		 * @return
		 * @throws IOException
		 */
		public char nextChar() throws IOException{
			byte c = read();
			while(Character.isWhitespace(c)){
				c = read();
			}
			return (char) c;	
		}
		
 
		/**
		 * Reads a double value.
		 * @return
		 * @throws IOException
		 */
		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
 
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
 
			if (c == '.') {
				while ((c = read()) >= '0' && c <= '9') {
					ret += (c - '0') / (div *= 10);
				}
			}
 
			if (neg)
				return -ret;
			return ret;
		}
 
		/**
		 * Reads an array of double values.
		 * @return
		 * @throws IOException
		 */
		public double[] nextDoubleArray(int n) throws IOException {
			double arr[] = new double[n];
			for(int i = 0; i < n; i++){
				arr[i] = nextDouble();
			}
			return arr;
		}
		
		/**
		 * Fills the buffer from input stream.
		 * 
		 * @throws IOException
		 */
		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}
 
		/**
		 * 
		 * @return
		 * @throws IOException
		 */
		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}
 
		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}
 
}