#include #include using namespace std; int main(void){ int N,cnt[12]={0},max=-1;string str; cin >> N; map eto{ {"ne",0}, {"ushi",1}, {"tora",2}, {"u",3}, {"tatsu",4}, {"mi",5}, {"uma",6}, {"hitsuji",7}, {"saru",8}, {"tori",9}, {"inu",10}, {"i",11} }; for(int i=0;i> str;cnt[eto[str]]++; if(cnt[eto[str]]>max)max=cnt[eto[str]]; } if(2*max-1<=N)cout << "YES" << endl; else cout << "NO" << endl; return 0; }