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

public class Main {
	  public static void main(String[] args) {
	        InputStream inputStream = System.in;
	        OutputStream outputStream = System.out;
	        InputReader in = new InputReader(inputStream);
	            try (PrintWriter out = new PrintWriter(outputStream)) {
	            	TaskC solver = new TaskC();
	                solver.solve(in, out);
	            }
	    }
}
class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream inputstream) {
      reader = new BufferedReader(new InputStreamReader(inputstream));
      tokenizer = null;
    }
    
    public String nextLine(){
    	String fullLine=null;
    	while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
              fullLine=reader.readLine();
            } catch (IOException e) {
              throw new RuntimeException(e);
            }
            return fullLine;
          }
          return fullLine;
    }
	public String next() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          tokenizer = new StringTokenizer(reader.readLine());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return tokenizer.nextToken();
    }
	public long nextLong() {
	      return Long.parseLong(next());
	    }
    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
class TaskC {
	void solve(InputReader in,PrintWriter out){
	String s=in.nextLine();
	boolean flag=false,flag1=false;
	int arr[]=new int[s.length()+2];
	for(int i=0;i<s.length();i++){
		arr[s.length()-i-1]=s.charAt(i)-48;
		//if(s.charAt(i)-48==0){
			//flag1=true;
		//}
	}
	
	boolean unit=false,tens=false,hundreds=false;
	int i=0,u=-1,t=-1,h=-1;
	int count=0;
	
	if(s.length()<4){
		int ans=arr[2]*100+arr[1]*10+arr[0];
		if(ans%8==0){
			flag=true;
			h=arr[2];
			t=arr[1];
			u=arr[0];
		}
	}
	while(true && !flag){
		if(i==s.length()){
			if(h==-1&&u!=-1)
				h=0;
			if(t==-1&&u!=-1)
				t=0;
			int ansa=h*100+t*10+u;
			if(ansa%8==0){
				flag=true;
				break;
			}
			count++;
			unit=false;
			tens=false;
			hundreds=false;
			u=-1;
			h=-1;
			t=-1;
			i=count;
			if(count>=s.length()-1)
				break;
			continue;
		}
		if(arr[i]%2==0 && !unit){
			u=arr[i];
			arr[i]=1;
			unit=true;
			i++;
			continue;
		}
		if(unit && !tens && (arr[i]*10+u)%4==0){
			t=arr[i];
			tens=true;
			i++;
			continue;
		}
		if(unit && tens && !hundreds && ((arr[i]*100)+(t*10)+u)%8==0){
			h=arr[i];
			flag=true;
			break;
		}
		i++;
	}
	/*if(flag1){
		out.println("YES");
		out.println("0");
	}*/
	if(flag){
		out.println("YES");
		out.println(h*100+t*10+u);
	}
	else
		out.println("NO");
	}
}