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:
s=input()
n=len(s)
if '0' in s:
  print("YES")
  print(0)
  exit()
if n==1:
  if s=='8':
    print("YES")
    print(s)
  else:
    print("NO")
  exit()
elif n==2:
  k=int(s)
  o=-1
  if int(s[0])%8==0 or int(s[1])%8==0:
    o=8
  if k%8==0:
    print("YES")
    print(k)
  else:
    if o==-1:
      print("NO")
    else:
      print("YES")
      print(o)
  exit()
elif n==3:
  k=int(s)
  o=-1
  if int(s[-1])%8==0 or int(s[-2])%8==0 or int(s[-3])%8==0:
    o=8
  if int(s[-2]+s[-1])%8==0:
    o=int(s[-2]+s[-1])
  if int(s[-3]+s[-1])%8==0:
    o=int(s[-3]+s[-1])
  if int(s[-3]+s[-2])%8==0:
    o=int(s[-3]+s[-2])
  if k%8==0:
    print("YES")
    print(k)
  else:
    if o==-1:
      print("NO")
    else:
      print("YES")
      print(o)
  exit()
h={}
for i in range(n-1,-1,-1):
  if int(s[i]) not in h:
    h[int(s[i])]=i
f={0:0,1:6,2:4,3:2,4:[0,8],5:6,6:4,7:2}
o=-1
for i in range(n-2):
  if s[i]=='0':
    o=0
    break
  if s[i]=='8':
    o=8
    break
  for j in range(i+1,n-1):
    m=int(s[i]+s[j])%8
    if m==0:
      o=int(s[i]+s[j])
      break
    if m==4:
      for k in f[m]:
        if k in h and h[k]>j:
          o=int(s[i]+s[j]+str(k))
          break
      if o!=-1:
        break
    else:
      if f[m] in h and h[f[m]]>j:
        o=int(s[i]+s[j]+str(f[m]))
        break
  if o!=-1:
    break      
if int(s[-1])%8==0 or int(s[-2])%8==0 or int(s[-3])%8==0:
  o=8
if int(s[-2]+s[-1])%8==0:
  o=int(s[-2]+s[-1])
if int(s[-3]+s[-1])%8==0:
    o=int(s[-3]+s[-1])
if int(s[-3]+s[-2])%8==0:
    o=int(s[-3]+s[-2])
if o==-1:
  for i in range(n-1):
    for j in range(i+1,n):
      if int(s[i]+s[j])%8==0:
        o=int(s[i]+s[j])
        break
    if o!=-1:
      break
#print(int(s[-2]+s[-1]))
if o ==-1:
  print("NO")
else:
  print("YES")
  print(o)