# your code goes here #eto349 N=int(input()) A=[input() for i in range(N)] Et=[0]*12 for i in range(N): if A[i]=="ne": Et[0]+=1 elif A[i]=="ushi": Et[1]+=1 elif A[i]=="tora": Et[2]+=1 elif A[i]=="u": Et[3]+=1 elif A[i]=="tatsu": Et[4]+=1 elif A[i]=="mi": Et[5]+=1 elif A[i]=="uma": Et[6]+=1 elif A[i]=="hitsuji": Et[7]+=1 elif A[i]=="saru": Et[8]+=1 elif A[i]=="tori": Et[9]+=1 elif A[i]=="inu": Et[10]+=1 elif A[i]=="i": Et[11]+=1 nd=0 i=0 #print(Et[7]) while nd==0 and i<12: if N%2==1 and Et[i]>N/2+1: nd=1 # print ("nd") elif N%2==0 and Et[i]>N/2: nd=1 # print (Et[i]) i+=1 if nd==1: print("NO") else: print("YES")