#include<iostream>
using namespace std;
string s;
string t="kadomatsu";
main()
{
	cin>>s;
	int comb=(1<<s.size())-1;
	while(comb<1<<9)
	{
		bool ok=true;
		int sz=0;
		for(int j=0;j<9;j++)if(comb>>j&1)
		{
			if(t[j]!=s[sz++])ok=false;
		}
		if(ok)
		{
			cout<<"Yes"<<endl;
			return 0;
		}
		int x=comb&-comb,y=comb+x;
		comb=(comb&~y)/x>>1|y;
	}
	cout<<"No"<<endl;
}