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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void merge(int arr[][2], int l, int m, int r) {
  int i, j, k;
  int n1 = m - l + 1;
  int n2 = r - m;
  int L[n1][2], R[n2][2];
  for (i = 0; i < n1; i++) {
    L[i][0] = arr[l + i][0];
    L[i][1] = arr[l + i][1];
  }
  for (j = 0; j < n2; j++) {
    R[j][0] = arr[m + 1 + j][0];
    R[j][1] = arr[m + 1 + j][1];
  }
  i = 0;
  j = 0;
  k = l;
  while (i < n1 && j < n2) {
    if (L[i][0] <= R[j][0]) {
      arr[k][0] = L[i][0];
      arr[k][1] = L[i][1];
      i++;
    } else if (L[i][0] > R[j][0]) {
      arr[k][0] = R[j][0];
      arr[k][1] = R[j][1];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k][0] = L[i][0];
    arr[k][1] = L[i][1];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k][0] = R[j][0];
    arr[k][1] = R[j][1];
    j++;
    k++;
  }
}
void mergeSort(int arr[][2], int l, int r) {
  if (l < r) {
    int m = l + (r - l) / 2;
    mergeSort(arr, l, m);
    mergeSort(arr, m + 1, r);
    merge(arr, l, m, r);
  }
}
void merge_2(int arr[][2], int l, int m, int r) {
  int i, j, k;
  int n1 = m - l + 1;
  int n2 = r - m;
  int L[n1][2], R[n2][2];
  for (i = 0; i < n1; i++) {
    L[i][0] = arr[l + i][0];
    L[i][1] = arr[l + i][1];
  }
  for (j = 0; j < n2; j++) {
    R[j][0] = arr[m + 1 + j][0];
    R[j][1] = arr[m + 1 + j][1];
  }
  i = 0;
  j = 0;
  k = l;
  while (i < n1 && j < n2) {
    if (L[i][1] <= R[j][1]) {
      arr[k][0] = L[i][0];
      arr[k][1] = L[i][1];
      i++;
    } else if (L[i][1] > R[j][1]) {
      arr[k][0] = R[j][0];
      arr[k][1] = R[j][1];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k][0] = L[i][0];
    arr[k][1] = L[i][1];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k][0] = R[j][0];
    arr[k][1] = R[j][1];
    j++;
    k++;
  }
}
void mergeSort_2(int arr[][2], int l, int r) {
  if (l < r) {
    int m = l + (r - l) / 2;
    mergeSort_2(arr, l, m);
    mergeSort_2(arr, m + 1, r);
    merge_2(arr, l, m, r);
  }
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  long long int x = 0, flag = 0;
  cin >> s;
  for (int i = 0; s[i] != '\0'; i++) {
    if (s[i] == '8') {
      x = 8;
      flag = 1;
      break;
    }
    if (s[i] == '0') {
      x = 0;
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    for (int i = 0; s[i] != '\0'; i++) {
      for (int j = i + 1; s[j] != '\0'; j++) {
        x = (s[i] - '0') * 10 + (s[j] - '0');
        if (x % 8 == 0) {
          flag = 1;
          break;
        }
      }
      if (flag == 1) {
        break;
      }
    }
  }
  if (flag == 0) {
    for (int i = 0; s[i] != '\0'; i++) {
      if (s[i] == '0') {
        continue;
      }
      for (int j = i + 1; s[j] != '\0'; j++) {
        for (int k = j + 1; s[k] != '\0'; k++) {
          x = (s[i] - '0') * 100 + (s[j] - '0') * 10 + (s[k] - '0');
          if (x % 8 == 0) {
            flag = 1;
            break;
          }
        }
        if (flag == 1) {
          break;
        }
      }
      if (flag == 1) {
        break;
      }
    }
  }
  if (flag == 1) {
    cout << "YES" << endl << x;
  } else {
    cout << "NO";
  }
  return 0;
}