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 __future__ import print_function
import sys
from collections import *
from heapq import *
INF=float("inf")
NINF=float("-inf")

try:
    input=raw_input
except:
    pass

def read_string():
    return input()

def read_int_line():
    return [int(x) for x in input().split(" ")]

def read_int():
    return int(input())

class TreeNode(object):
    def __init__(self, x):
        self.val = x
        self.left = None
        self.right = None
    def __str__(self):
        q=deque()
        ans=[]
        q.append(self)
        ans.append(self.val)
        while q:
            cur=q.popleft()
            ans.append(cur.left.val if cur.left else "null")
            ans.append(cur.right.val if cur.right else "null")
            if cur.left:
                q.append(cur.left)
            if cur.right:
                q.append(cur.right)
        while ans and ans[-1] == "null":
            ans.pop()
        return str(ans).replace("'null'", 'null')

def toTreeNode(s):
    l = eval(s.replace("null", "None"))
    n=len(l)
    if not n:
        return None
    root=TreeNode(l[0])
    q=deque()
    q.append(root)
    i=1
    while q and i < n:
        cur=q.popleft()
        if l[i] != None:
            cur.left = TreeNode(l[i])
            q.append(cur.left)
        i+=1
        if i>=n:
            break
        if l[i] != None:
            cur.right=TreeNode(l[i])
            q.append(cur.right)
        i+=1
    return root

class Djs:
    def __init__(self, n):
        self.w=[1]*n
        self.p=[-1]*n
    def find(self, x):
        p=self.p[x]
        if p==-1:
            return x
        else:
            self.p[x]=self.find(p)
            return self.p[x]
    def union(self, x, y):
        x,y=self.find(x),self.find(y)
        if x==y:
            return
        if self.w[x]>self.w[y]:
            x,y=y,x
        self.p[x]=y
        self.w[y]+=self.w[x]
    def roots(self):
        return [x for x, y in enumerate(self.p) if y==-1]

def doit():
    s=read_string()
    s3, s2, s1={},{},{}
    for c in s:
        n=int(c)
        for k, v in s2.items():
            v1=v*10+n
            k1=v1%8
            if k1==0:
                print("YES\n%d"%v1)
                return
            if k1 not in s3:
                s3[k1]=v1
        for k, v in s1.items():
            v1=v*10+n
            k1=v1%8
            if k1==0:
                print("YES\n%d"%v1)
                return
            if k1 not in s2:
                s2[k1]=v1
        k, v=n%8,n
        if k==0:
            print("YES\n%d"%v)
            return
        if k not in s1:
            s1[k]=v
    print("NO")


if __name__ == "__main__":
    try:
        while True:
            doit()
    except EOFError:
        pass