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

def f(lst):
    b2, b4, b6, b12, b52, b92, b44, b36, b76 = False, False, False, False, False, False, False, False, False
    for k in range(len(lst)-1,-1,-1):
        a = int(lst[k])
        if a in [0,8]:
            return "YES\n" + str(a)
        elif a == 2:
            b2 = True
            if b4:
                return "YES\n24"
        elif a == 4:
            if b4:
                b44 = True
            b4 = True
        elif a == 6:
            b6 = True
            if b4 == True:
                return "YES\n64"
        elif a == 1:
            if b12:
                return "YES\n112"
            if b44:
                return "YES\n144"
            if b6:
                return "YES\n16"
            if b52:
                return "YES\n152"
            if b92:
                return "YES\n192"
            if b2:
                b12 = True
        elif a == 5:
            if b6:
                return "YES\n56"
            if b52:
                return "YES\n552"
            if b92:
                return "YES\n592"
            if b44:
                return "YES\n544"
            if b12:
                return "YES\n512"
            if b2:
                b52 = True
        elif a == 9:
            if b6:
                return "YES\n96"
            if b52:
                return "YES\n952"
            if b92:
                return "YES\n992"
            if b44:
                return "YES\n944"
            if b12:
                return "YES\n912"
            if b2:
                b92 = True
        elif a == 3:
            if b2:
                return "YES\n32"
            if b44:
                return "YES\n344"
            if b76:
                return "YES\n376"
            if b36:
                return "YES\n336"
            if b6:
                b36 = True
        elif a == 7:
            if b2:
                return "YES\n72"
            if b44:
                return "YES\n744"
            if b76:
                return "YES\n776"
            if b36:
                return "YES\n736"
            if b6:
                b76 = True
    return "NO"
print(f(lst))