import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); int N = Integer.parseInt(reader.readLine()); String[] ornaments = new String[]{"ne", "ushi", "tora", "u", "tatsu", "mi", "uma", "hitsuji", "saru", "tori", "inu", "i"}; Map map = new HashMap<>(); for (int i = 0; i < 12; i++) { map.put(ornaments[i], i); } int[] table = new int[12]; for (int i = 0; i < N; i++) { String ornament = reader.readLine(); table[map.get(ornament)] += 1; } int max = Integer.MIN_VALUE; for (int i = 0; i < 12; i++) { max = Math.max(max, table[i]); } String answer = "YES"; for (int i = 0; i < 12; i++) { if (table[i] > ((N+1) / 2)) { answer="NO"; break; } } System.out.println(answer); } }