class Program { static void Main(string[] args) { int[] onHand = new int[13]; string[] card = Console.ReadLine().Split(' '); for(int i = 0; i < 5; i++) { onHand[int.Parse(card[i])-1]++; } int countPAIR = 0; int countTHREE = 0; for(int i = 0; i < 13; i++) { if (onHand[i] == 2) { countPAIR++; }else if (onHand[i] == 3) { countTHREE++; } } Console.WriteLine(RoleJudgement(countTHREE, countPAIR)); } private static string RoleJudgement(int countTHREE, int countPAIR) { if (countTHREE == 1 && countPAIR == 1) { return "FULL HOUSE"; } else if (countTHREE == 1 && countPAIR == 0) { return "THREE CARD"; } else if (countTHREE == 0 && countPAIR == 2) { return "TWO PAIR"; } else if (countTHREE == 0 && countPAIR == 1) { return "ONE PAIR"; } else { return "NO HAND"; } } }