#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
#define M 1000000007
#define pb push_back
#define mp make_pair
#define pi 3.1415926536
#define prior priority_queue<int,vector<int>,greater<int>>
#define fi first
#define se second
const int INF =1e9 +5;
const int N=4e6+5;

/*int gcd(int a,int b){
    if(b==0)return a;
    return gcd(b,a%b);
}
int pw(int a,int b,int p){
    if(b==0)return 1;
    int t=pw(a,b/2,p);
    if(b%2)return (((a*t)%p)*t)%p;
    else return ((t*t)%p);
}

int fact[N],invfact[N];
void init(){
    fact[0]=1;
    int i;
    for(i=1;i<N;i++)
    {
            fact[i]=i*fact[i-1]%M;
    }
    i--;
    invfact[i]=pw(fact[i],M-2,M);
    for(i--;i>=0;i--){
        invfact[i]=(i+1)*invfact[i+1]%M;
    }
}
int ncr(int n,int r,int p){
    return (((fact[n]*invfact[n-r])%p)*invfact[r])%p;
}
int f(int r1,int r2,int k){
	int ans= ncr(k+1+r2,k,M) - ncr(k+r1,k,M)+M;
	ans%=M;
	return ans;
}*/
int32_t main()
{
    IOS;
    int t=1;
    //cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        cout<<(n/100)+bool (n%100);
    }

}

#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fast_io ios_base::sync_with_stdio(0); cin.tie(0)
#define MOD 100000007
 
typedef long long ll;
typedef pair<ll, ll> pii;
typedef vector<pii> vp;
typedef vector<ll> vi;
typedef set<ll> sit; 

int main()
{
    fast_io;
    string str, str2;
    ll size, elm, tc, lim, n;
    //cin>>tc;
    tc = 1;
    while(tc--)
    {
        cin>>str;
        vi vec(10, 0);
        size = str.size();
        for(ll x = 0; x < size; x++)
        {
            vec[str[x] - '0']++;
        }
        ll ans = 0;
        if(size < 3)
        {
            if(size == 1 && (str[0]-'0')%8 == 0)
                cout<<"Yes";
            else if(size == 1)
                cout<<"No";
            else if(size == 2 && (stoi(str) % 8 == 0))
                cout<<"Yes";
            else if(size == 2)
            {
                swap(str[0], str[1]);
                if((stoi(str) % 8 == 0))
                    cout<<"Yes";
                else
                    cout<<"No";
            }
                
        }
        else
        {
            for(ll x = 104; x < 999; x+=8)
            {
                vi vec2;
                str = to_string(x);
                for(ll i=0; i < 10; i++) 
                    vec2.pb(vec[i]);
                ll is = 1;
                for(ll y = 0; y < str.size(); y++)
                {
                    if(vec2[str[y] - '0'] <= 0)
                    {
                        is = 0;
                        break;   
                    }
                    else
                        vec2[str[y] - '0']--;
                }
                if(is)
                {
                    ans = x;
                    //cout<<ans;   
                }
            }
            if(!ans)
                cout<<"No";
            else
                cout<<"Yes \n";
        }
    }
    return 0;
}