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:
'''
def main():
    from sys import stdin,stdout
if __name__=='__main__':
    main()
'''
#489C
'''
def main():
    from sys import stdin,stdout
    m,s=map(int,stdin.readline().split())
    maxim=''
    S=s
    while S:
        if S>10:
            S-=9
            maxim+='9'
        else:
            maxim+=str(S)
            S=0
    n=m-len(maxim)
    if n>=0:
        maxim+=n*'0'
    else:
        maxim='-1'
    if m<s/9:
        minim='-1'
    else:
        
if __name__=='__main__':
    main()
'''
#118B
'''
def main():
    from sys import stdin,stdout
    n=int(stdin.readline())
    for i in range(n+1):
        stdout.write(' '*(2*(n-i)))
        for k in range(i+1):
            if k:
                if k==1:
                    stdout.write(' 1 ')
                else:
                    stdout.write(str(k)+' ')
            else:
                stdout.write('0')
        for k in range(i-1,-1,-1):
            if k:
                stdout.write(str(k)+' ')
            else:
                stdout.write('0')
        stdout.write('')
    for j in range(i-1,-1,-1):
        stdout.write(' '*2*(n-j))
        for k in range(j+1):
            if k:
                if k==1:
                    stdout.write(' 1 ')
                else:
                    stdout.write(str(k)+' ')
            else:
                stdout.write('0')
        for k in range(j-1,-1,-1):
            if k:
                stdout.write(str(k)+' ')
            else:
                stdout.write('0')
        stdout.write('')
if __name__=='__main__':
    main()
'''
#499B
'''
def main():
    from sys import stdin,stdout
    n,m=map(int,stdin.readline().split())
    mydic={}
    for _ in range(m):
        a,b=map(str,stdin.readline().strip().split())
        mydic[a]=b
    for k in stdin.readline().strip().split():
        if len(mydic[k])<len(k):
            stdout.write(mydic[k]+' ')
        else:
            stdout.write(k+' ')
if __name__=='__main__':
    main()
'''
#450A
'''
def main():
    from sys import stdin,stdout
    n,m=map(int,stdin.readline().split())
    k=list(range(1,n+1))
    a=list(map(int,stdin.readline().split()))
    while k!=[]:
        top=k[0]
        if a[top-1]<=m:
            k=k[1:]
            a[top-1]=0
        else:
            a[top-1]-=m
            k=k[1:]+[top]
    stdout.write(str(top))
if __name__=='__main__':
    main()
'''
#550C
def main():
    from sys import stdin,stdout
    n=stdin.readline().strip()
    i=0
    k=2
    t=''
    for j in n[::-1]:
        if j=='0':
            t='0'
            break
        elif j=='8':
            t='8'
            break
        i+=1
        if k==16:
            break
        if int(j+t) & (k-1):
            continue
        else:
            t=j+t
            k<<=1
    #print(t,i)
    if t!='':
        if int(t)%8==0:
            if i!=len(n) and t!='0' and t!='8':
                stdout.write('YES\n'+n[:len(n)-i+1]+t)
            else:
                stdout.write('YES\n'+t)
        else:
            stdout.write('NO')
    else:
        stdout.write('NO')
if __name__=='__main__':
    main()