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