#include <iostream>
using namespace std;
int main() {
    int m,k,n;
    n=0;
    cin >>m>>k;
    if(m%19)
        cout <<"NO";
    else {
        while(m){
            if(m%10==3)
                n++;
            m/=10;
        }
        if(n==k)
            cout<<"YES";
        else
        cout <<"NO";    
    }
    return 0;
}

发表评论