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 PYTHON3):

Solution:
#Imports
from collections import defaultdict as dc
from collections import Counter
import sys
import math
mod=10**9 +7
# How to sort a list using two compare :
# instead of defining a function define class as a key
# class key(str):
#     def __lt__(x,y):#         return int(x+y)>int(y+x)

def sinp():
    p=str(sys.stdin.readline())
    return p

def seive(n):
    p=[0]*(n+1)
    for i in range(2,n):           
        for j in range(2*i,n+1,i):
                p[i]=1
    return p


def inp(): 
    p=int(sys.stdin.readline())
    return p

def line():
    p=list(map(int,sys.stdin.readline().split()))
    return p

def read_mat():
    n=inp()
    a=[]
    for i in range(n):
        a.append(line())
    return a


def solve(t):
    s=str(input())
    p=int(s)
    n=len(s)
    q=dc(int)
    for i in range(0,100):
        if i%8==0:
            q[i]+=1
    # print(q)
    if p%8==0:
        print("YES")     
        print(s)
    elif n==1:
        print("NO")
    elif n==2:
        if s.count('0')>0:
            print("YES")
            print(0)
        elif s.count('8')>0:
            print("YES")
            print(8)
        else:
            print("NO")
    else:
        l=list(map(int,s))
        ans=0
        for i in range(n):
            if q[l[i]]:
                print("YES")
                print(l[i])
                ans=1
                break
            for j in range(i+1,n):
                for k in range(j+1,n):
                    z=l[i]*100 + l[j]*10 + l[k]
                    x=l[i]*10 + l[j]
                    y=l[i]*10 +l[k]
                    z1=l[j]*10 + l[k]
                    if q[x]:
                        print("YES")
                        print(x)
                        ans=1
                        break
                    elif q[y]:
                        print("YES")
                        print(y)
                        ans=1
                        break
                    elif q[z1]:
                        print("YES")
                        print(z1)
                        ans=1
                        break
                    elif z%8==0:
                        print("YES")
                        print(z)
                        ans=1
                        break
                if ans==1:
                    break
            if ans==1:
                break
        if ans==0:
            print("NO")
t=1 
# t=inp()
for _ in range(t):
    solve(t)