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++; } } string result = ""; if(countTHREE == 1 && countPAIR == 1) { result = "FULL HOUSE"; }else if(countTHREE == 1 && countPAIR == 0) { result = "THREE CARD"; } else if (countTHREE == 0 && countPAIR == 2) { result = "TWO PAIR"; } else if (countTHREE == 0 && countPAIR == 1) { result = "ONE PAIR"; } else { result = "NO HAND"; } Console.WriteLine(result); } }