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;
bool checkzero(vector<int> v) {
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == 0) return true;
  }
  return false;
}
bool checkodd(vector<int> v) {
  for (int i = 0; i < v.size(); i++) {
    if ((v[i] % 2) == 0) return false;
  }
  return true;
}
bool checkeight(vector<int> v) {
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == 8) return true;
  }
  return false;
}
int power(int x) {
  if (x == 0)
    return 1;
  else if (x == 1)
    return 10;
  else {
    if (x % 2 == 0) {
      int temp = power(x / 2);
      return temp * temp;
    } else {
      int temp = power(x / 2);
      return temp * temp * 10;
    }
  }
}
int getnumber(vector<int> v) {
  int answer = 0;
  for (int i = v.size() - 1; i > -1; i--) {
    answer += v[i] * (power(v.size() - 1 - i));
  }
  return answer;
}
vector<int> getvector(int n) {
  stack<int> temp;
  vector<int> v;
  while (n != 0) {
    temp.push(n % 10);
    n /= 10;
  }
  while (!temp.empty()) {
    v.push_back(temp.top());
    temp.pop();
  }
  return v;
}
bool exist(vector<int> v1, vector<int> v2) {
  int temp = v2[0];
  int count = 0;
  int index = 0;
  for (int i = 0; i < v1.size(); i++) {
    if (count == v2.size())
      break;
    else {
      if (v1[i] == temp) {
        count++;
        index++;
        if (index < v2.size()) temp = v2[index];
      }
    }
  }
  if (count == v2.size())
    return true;
  else
    return false;
}
void display(vector<int> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i];
  cout << endl;
}
int main() {
  string s;
  cin >> s;
  vector<int> digits;
  for (int i = 0; i < s.size(); i++) {
    digits.push_back((int)s[i] - 48);
  }
  if (checkzero(digits)) {
    cout << "YES" << endl;
    cout << "0" << endl;
  } else if (checkeight(digits)) {
    cout << "YES" << endl;
    cout << "8" << endl;
  } else {
    if (checkodd(digits)) {
      cout << "NO" << endl;
    } else {
      if (digits.size() <= 2) {
        if (((getnumber(digits)) % 8) == 0) {
          cout << "YES" << endl;
          cout << getnumber(digits) << endl;
        } else {
          cout << "NO" << endl;
        }
      } else {
        vector<int> parameter;
        parameter.push_back(16);
        for (int i = 24; i < 1001; i += 8) parameter.push_back(i);
        int flag = 0;
        for (int i = 0; i < parameter.size(); i++) {
          vector<int> tempdigits;
          tempdigits = getvector(parameter[i]);
          if (exist(digits, tempdigits)) {
            cout << "YES" << endl;
            display(tempdigits);
            flag = 1;
            break;
          }
        }
        if (flag == 0) cout << "NO" << endl;
      }
    }
  }
  return 0;
}