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

public class Main{

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
       String s = in.readString();
       if (s.contains("0")) {

out.printLine("YES");
           out.printLine(0);
       }
       else
       {
           if (s.length()>=3)
           {
               boolean check = false;
               String ans = "";
               int n =s.length();
               for (int i =0;i<n;i++)
               {

                   for (int j=i+1;j<n;j++)
                   {

                       for (int k=j+1;k<n;k++)
                       {
                           StringBuilder b = new StringBuilder();
                           b.append(s.charAt(i));

                           b.append(s.charAt(j));
                           b.append(s.charAt(k));
                           int temp = Integer.parseInt(b.toString());
                           if (temp%8==0)
                           {
                               check = true;
                               ans = b.toString();
                               break;
                           }

                       }
                       if (check)
                           break;
                   }
                   if (check)
                       break;
               }
              if (check)
              {
                  out.printLine("YES");
                  out.printLine(ans);
              }
              else {
                  for (int j=0;j<n;j++)
                  {

                      for (int k=j+1;k<n;k++)
                      {
                          StringBuilder b = new StringBuilder();


                          b.append(s.charAt(j));
                          b.append(s.charAt(k));
                          int temp = Integer.parseInt(b.toString());
                          if (temp%8==0)
                          {
                              check = true;
                              ans = b.toString();
                              break;
                          }

                      }
                      if (check)
                          break;
                  }
                  if (check)
                  {
                      out.printLine("YES");
                      out.printLine(ans);
                  }
                  else
                  {
                      for (int k=0;k<n;k++)
                      {
                          StringBuilder b = new StringBuilder();
                          b.append(s.charAt(k));
                          int temp = Integer.parseInt(b.toString());
                          if (temp%8==0)
                          {
                              check = true;
                              ans = b.toString();
                              break;
                          }

                      }
                      if (check)
                      {
                          out.printLine("YES");
                          out.printLine(ans);
                      }
                      else
                          out.printLine("NO");
                  }
              }
           }
           else if (s.length()==1)
           {
               if (Integer.parseInt(s)%8==0)
               {
                   out.printLine("YES");
                   out.printLine(s);
               }
               else
                   out.printLine("NO");
           }
           else
           {
               if (Integer.parseInt(s)%8==0)
               {
                   out.printLine("YES");
                   out.printLine(s);
               }
               else
               {
                   if ((s.charAt(0)-48)%8==0)
                   {
                       out.printLine("YES");
                       out.printLine(s.charAt(0));
                   }
                   else
                   {
                       if ((s.charAt(1)-48)%8==0)
                       {
                           out.printLine("YES");
                           out.printLine(s.charAt(1));
                       }
                       else
                           out.printLine("NO");
                   }
               }
           }

       }
         out.flush();
    }

}


class Graph {


    int n;
    LinkedList<Integer>[] adjList;

    public Graph(int n) {
        this.n = n;
        adjList = new LinkedList[n];
        for (int i = 0; i < n; i++)
            adjList[i] = new LinkedList<>();
    }

}


class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

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

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

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    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 String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

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

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

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(Object... objects) {
        print(objects);
        writer.println();
    }

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

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

}