#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int m,d,k; cin>>m>>d>>k; set s; int now=d; s.insert(m); for(int i=d;i S; for(auto t:s){ string x=to_string(t); if(x.size()==1) S.insert('0'); rep(i,(int) x.size()) S.insert(x[i]); } if(S.size()>=k) cout<<"Yes"<