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.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;

public class Main
{



  public static void main(String[] args)
  {    
    long startTime = System.nanoTime();
    char [] s=in.next().toCharArray();
    ArrayList<Integer> divisors = eightDivisors(0,1000);
    boolean possible=false;
    for(int number:divisors)
    {
      int [] indexes=getIndexes(number,s);
      if(indexes.length == 0 )
      {
        continue;
      }
      else
      {
        out.println("YES");
        for(int i=0;i<indexes.length;i++)
        {
          out.print(s[indexes[i]]);
        }
        out.println("");
        exit(0);
      }
    }
    out.println("NO");
    long endTime = System.nanoTime();
    err.println("Execution Time : +" + (endTime-startTime)/1000000 + " milli secs");
    exit(0);
  }

  public static boolean inRange(int ind,int [] indexes)
  {
    for(int i=0;i<indexes.length-1;i++)
    {
      if( ind > indexes[i] && ind < indexes[i+1])
      {
        return true;
      }
    }
    return false;
  }

  public static int [] getIndexes(int number,char [] digits)
  {
     char [] num=Integer.toString(number).toCharArray();
     int [] indexes=new int [num.length];
     int pos=0;
     for(int i=0;i<num.length;i++)
     {
       int ind=search(num[i],pos,digits);
       if(ind==-1)
       {
         return new int [0];
       }
       else
       {
          indexes[i]=ind;
          pos=ind+1;
       }
     }
     return indexes;
  }

  public static int search(char val,int pos,char [] digits)
  {
    for(int i=pos;i<digits.length;i++)
    {
      if(digits[i]==val) return i;        
    }
    return -1;
  }

  public static ArrayList<Integer> eightDivisors(int start,int end)
  {
    ArrayList<Integer> divisors=new ArrayList<Integer>();
    int i=0;
    for(i=start;;i++)
    {
      if(i%8==0)
      {        
        break;
      }
    }
    for(int j=i;j<end;j+=8)
    {
      divisors.add(j);
    }
    return divisors;
  }

  static class InputReader
  {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        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());
        }

        public double nextDouble(){
           return Double.parseDouble(next());
        }
    }


    static void exit(int a)
    {
      out.close();
      err.close();
      System.exit(a);
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static OutputStream errStream = System.err;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);
    static PrintWriter err = new PrintWriter(errStream);

}