using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] a = new int[12]; Dictionary d = new Dictionary(); d.Add("ne", 0); d.Add("ushi", 1); d.Add("tora", 2); d.Add("u", 3); d.Add("tatsu", 4); d.Add("mi", 5); d.Add("uma", 6); d.Add("hitsuji", 7); d.Add("saru", 8); d.Add("tori", 9); d.Add("inu", 10); d.Add("i", 11); for (int i = 0; i < n; i++) { a[d[Console.ReadLine()]]++; } if ((n - n / 2) < a.Max()) { Console.WriteLine("NO"); } else { Console.WriteLine("YES"); } Console.Read(); } }