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;
long long int summ;
long long int f, s, g, u, d;
vector<bool> sieve(long long int n) {
  vector<bool> prime(n + 1, true);
  prime[0] = prime[1] = false;
  for (long long int i = 2; i <= n; ++i) {
    if (prime[i] && (i * i) <= n)
      for (long long int j = i * i; j <= n; j += i) prime[j] = false;
  }
  return prime;
}
long long int power(long long int a, long long int b,
                    long long int m = 1000000007) {
  a %= m;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
vector<int> robin_karp(string s, string t) {
  int P = 31, S = s.size(), T = t.size();
  long long int m = 1e9 + 9;
  vector<long long int> p(max(S, T));
  p[0] = 1;
  int len = p.size();
  for (long long int i = 1; i < len; ++i) p[i] = (p[i] * P) % m;
  vector<long long int> h(T + 1, 0);
  for (int i = 0; i < T; i++) h[i + 1] = (h[i] + (t[i] - 'a' + 1) * p[i]) % m;
  long long h_s = 0;
  for (int i = 0; i < S; i++) h_s = (h_s + (s[i] - 'a' + 1) * p[i]) % m;
  vector<int> occurences;
  for (int i = 0; i + S - 1 < T; i++) {
    long long cur_h = (h[i + S] + m - h[i]) % m;
    if (cur_h == h_s * p[i] % m) occurences.push_back(i);
  }
  return occurences;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long int a[s.size()];
  for (long long int i = 0; i < s.size(); ++i) {
    a[i] = s[i] - 48;
  }
  bool flag = false;
  if (s.size() >= 3) {
    for (long long int i = 0; i < s.size(); i++) {
      for (int j = i + 1; j < s.size(); j++) {
        for (int k = j + 1; k < s.size(); k++) {
          if ((a[i] * 100 + a[j] * 10 + a[k]) % 8 == 0) {
            cout << "YES" << '\n' << (a[i] * 100 + a[j] * 10 + a[k]);
            flag = true;
            break;
          } else if ((a[i] * 10 + a[j]) % 8 == 0) {
            cout << "YES" << '\n' << a[i] * 10 + a[j];
            flag = true;
            break;
          } else if ((a[i] * 10 + a[k]) % 8 == 0) {
            cout << "YES" << '\n' << a[i] * 10 + a[k];
            flag = true;
            break;
          } else if ((a[j] * 10 + a[k]) % 8 == 0) {
            cout << "YES" << '\n' << a[j] * 10 + a[k];
            flag = true;
            break;
          } else if (a[i] % 8 == 0) {
            cout << "YES" << '\n' << a[i];
            flag = true;
            break;
          } else if (a[j] % 8 == 0) {
            cout << "YES" << '\n' << a[j];
            flag = true;
            break;
          } else if (a[k] % 8 == 0) {
            cout << "YES" << '\n' << a[k];
            flag = true;
            break;
          }
        }
        if (flag) break;
      }
      if (flag) break;
    }
  } else if (s.size() < 3) {
    if (stoi(s) % 10 == 0) {
      cout << "YES" << '\n' << 0;
      flag = true;
    } else if (stoi(s) % 8 == 0) {
      cout << "YES" << '\n' << stoi(s);
      flag = true;
    }
  }
  if (!flag) cout << "NO";
  return 0;
}