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.
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.
import sys

def combinationUtil(arr, n, r, index, data, i):
    # Current combination is 
    # ready to be printed,
    # print it
    if(index == r):
        suma = 0
        string = ""
        for j in range(r):
            suma += data[j] * (10 ** (r-j-1))
            string += str(data[j])
        if suma % 8 == 0:
            print("YES")
            print(string)
            sys.exit()
        return
 
    # When no more elements 
    # are there to put in data[]
    if(i >= n):
        return
 
    # current is included, 
    # put next at next
    # location 
    data[index] = arr[i]
    combinationUtil(arr, n, r, index + 1, data, i + 1)
     
    # current is excluded, 
    # replace it with
    # next (Note that i+1 
    # is passed, but index 
    # is not changed)
    combinationUtil(arr, n, r, index, 
                    data, i + 1)
 
 
# The main function that
# prints all combinations
# of size r in arr[] of 
# size n. This function 
# mainly uses combinationUtil()
def printcombination(arr, n, r):
 
    # A temporary array to
    # store all combination
    # one by one
    data = list(range(r))
     
    # Print all combination 
    # using temporary 
    # array 'data[]'
    combinationUtil(arr, n, r, 
                    0, data, 0)
 
 
arr = list(map(int, list(input()))) 
r = 3
n = len(arr)

for i in range(1, 4):
    printcombination(arr, n, i)

print("NO")
		 	 			   	 					      		 	 		