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:
from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import random
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))
#sys.setrecursionlimit(1500)
def dict(a):
    d={} 
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d
def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_left(a, x)
    if i != len(a):
        return i
    else:            
        return -1
def cal(l,i,n,dp):
    
    if i>=len(l):
        if n%8==0:
            return n
        else:
            return -1
    if n%8==0:
        return n

    t1=cal(l,i+1,n,dp)
    t2=cal(l,i+1,(n*10)+int(l[i]),dp)
    if t1!=-1 or t2!=-1:
        if t1!=-1:
            dp[i]=t1
        if t2!=-1:
            dp[i]=t2
        return max(t1,t2)
    else:
        return -1

def main():
    try:
        l=list(input())
        ans=-1
        dp=[]
        n=len(l)
        for x in range(n):
            temp=[]
            for y in dp:
                z=y*10+int(l[x])
                if z<1000:
                    temp.append(z)
                if temp[-1]%8==0:
                    ans=temp[-1]
                    break
            dp.append(int(l[x]))
            if(int(l[x]))%8==0:
                ans=int(l[x])
            if ans!=-1:
                break
            dp+=temp.copy()
        if ans!=-1:
            yes()
            print(ans)
        else:
            no()
    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    #for _ in range(I()):main()
    for _ in range(1):main()