n = int(input()) eto_name=['ne','ushi','tora','u','tatsu','mi','uma','hitsuji','saru','tori','inu','i'] eto_count_start=[0,0,0,0,0,0,0,0,0,0,0,0] eto_count=dict(zip(eto_name,eto_count_start)) for i in range(n): dummy_name=input() eto_count[dummy_name]+=1 YorN = 1 standpoint = int((n+1)/2) for name in range(eto_count): if eto_count[name]>standpoint: YorN = 0 if YorN: print("YES") else: print("NO")