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:
x = int(input())

x = list(str(x)[::-1])

a = []
for i in range(1000):
    if i % 8 == 0:
        if i <10:
            a.append(list(str(i)[::-1] + '00'))
        elif 9 < i <100:
            a.append(list(str(i)[::-1] + '0'))
        else:
            a.append(list(str(i)[::-1]))

b = []
for i in range(9, 100):
    if i % 8 == 0:
        b.append(list(str(i)[::-1]))


c = ['0', '8']

a2 = []
for i in range(len(a)):
    if (a[i][0] in x) and (a[i][1] in x[x.index(a[i][0]) + 1:]) and (a[i][2] in x[x.index(a[i][0]) + 1:][x[x.index(a[i][0]) + 1:].index(a[i][1]) + 1:]):
        dlt1 = x.index(a[i][0])
        dlt2 = x[x.index(a[i][0]) + 1:].index(a[i][1])
        dlt3 = x[x.index(a[i][0]) + 1:][x[x.index(a[i][0]) + 1:].index(a[i][1]) + 1:].index(a[i][2])
        a2.append(dlt1 + dlt2 + dlt3)
    else:
        a2.append(101)

b2 = []
for i in range(len(b)):
    if (b[i][0] in x) and (b[i][1] in x[x.index(b[i][0]) + 1:]):
        b2.append(len(x) - 2)
    else:
        b2.append(101)

c2 = []
for i in range(2):
    if c[i] in x:
        c2.append(len(x) - 1)
    else:
        c2.append(101)


mina2 = min(a2)
minb2 = min(b2)
minc2 = min(c2)

minmin = min(mina2, minb2, minc2)

if minmin == 101:
    print('NO')
else:
    if mina2 <= minb2 and mina2 <= minc2:
        edge = a[a2.index(mina2)]
    elif minb2 <= mina2 and minb2 <= minc2:
        edge = b[b2.index(minb2)]
    elif minc2 <= minb2 and minc2 <= mina2:
        edge = c[c2.index(minc2)]

   
    i = -1
    j = -1
    x.reverse()
    

    if len(edge) > 2:
        edge.reverse()
        while x[-3:] != edge:
            p = x[-3:]
            if x[i] == edge[j]:
                i -= 1
                j -= 1
            else:
                del x[i]
        print('YES', "\n" ,"".join(x))

    elif 1 < len(edge) < 3:
        print('YES','\n',"".join(edge[::-1]))

    elif len(edge) < 2:
        print('YES','\n',"".join(edge))