#include <bits/stdc++.h>   using namespace std;   signed main() {     string s;     cin >> s;     char zero =  0 ;     s =  00  + s;     long long n = (long long)s.size();     for (long long i = 0; i < n - 2; i++) {       long long temp = 100 * (s[i] - zero);       for (long long j = i + 1; j < n - 1; j++) {         temp += (10 * (s[j] - zero));         for (long long k = j + 1; k < n; k++) {           temp += (s[k] - zero);           if (temp % 8 == 0) {             cout <<  YES  <<   n ;             cout << temp <<   n ;             return 0;           }           temp -= (s[k] - zero);         }         temp -= (10 * (s[j] - zero));       }     }     cout <<  NO  <<   n ;   }   