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;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 29;
inline long long two(long long n) { return 1 << n; }
inline long long test(long long n, long long b) { return (n >> b) & 1; }
inline void setBit(long long &n, long long b) { n |= two(b); }
inline void unsetBit(long long &n, long long b) { n &= ~two(b); }
inline long long last_bit(long long n) { return n & (-n); }
inline long long ones(long long n) {
  int res = 0;
  while (n && ++res) n -= n & (-n);
  return res;
}
inline bool sortDown(long long x, long long y) { return x > y; }
template <class T>
void chmax(T &a, const T &b) {
  a = max(a, b);
}
template <class T>
void chmin(T &a, const T &b) {
  a = min(a, b);
}
bool wayToSort(long long i, long long j) { return i > j; }
bool sortinrev(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.first > b.first);
}
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
bool sortbysecdesc(const pair<long long, long long> &a,
                   const pair<long long, long long> &b) {
  return a.second > b.second;
}
string s;
long long len;
long long pos[10];
bool check(long long a, long long b, long long c) {
  long long count = 0;
  for (int i = (len - 1); i >= (0); i--) {
    if (count == 0 && s[i] == a + '0') {
      count++;
      pos[0] = i;
    } else if (count == 1 && s[i] == b + '0') {
      count++;
      pos[1] = i;
    } else if (count == 2 && s[i] == c + '0') {
      count++;
      pos[2] = i;
    }
    if (count == 3) break;
  }
  return count == 3;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  len = s.length();
  if (len == 1) {
    if (s[0] == '0' || s[0] == '8')
      cout << "YES" << endl << s << endl;
    else
      cout << "NO" << endl;
    return 0;
  }
  if (len == 2) {
    long long n = ((s[0] - '0') * 10 + (s[1] - '0'));
    if (n % 8 == 0)
      cout << "YES" << endl << s << endl;
    else if (s[0] == '0' || s[0] == '8')
      cout << "YES" << endl << s[0] << endl;
    else if (s[1] == '0' || s[1] == '8')
      cout << "YES" << endl << s[1] << endl;
    else
      cout << "NO" << endl;
    return 0;
  }
  for (long long d = 0; d < (125); d++) {
    long long n = d * 8;
    long long digit = 0;
    long long a = n % 10;
    n /= 10;
    long long b = n % 10;
    n /= 10;
    long long c = n % 10;
    if (c != 0)
      digit = 3;
    else {
      if (b != 0)
        digit = 2;
      else
        digit = 1;
    }
    if (digit == 1) {
      for (long long i = 0; i < (len); i++) {
        if (s[i] == a + '0') {
          cout << "YES" << endl << a << endl;
          return 0;
        }
      }
    }
    if (digit == 2) {
      long long cnt = 0;
      for (int i = (len - 1); i >= (0); i--) {
        if (cnt == 0 && s[i] == a + '0')
          cnt++;
        else if (cnt == 1 && s[i] == b + '0')
          cnt++;
        if (cnt == 2) {
          cout << "YES" << endl << b << a << endl;
          return 0;
        }
      }
    }
    if (check(a, b, c)) {
      cout << "YES" << endl;
      for (long long j = 0; j < (pos[2] + 1); j++) cout << s[j];
      cout << s[pos[1]] << s[pos[0]] << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}