using System; using System.Linq; class Program { static void Main(string[] args) { string answer; string[] c = Console.ReadLine().Split(' '); int[] cnt = new int[13]; for (int i = 0; i < 5; i++) { cnt[int.Parse(c[i]) - 1]++; } int three = cnt.Count(x => x == 3); int pair = cnt.Count(x => x == 2); if (three > 0) { if (pair > 0) { answer = "FULL HOUSE"; } else { answer = "THREE CARD"; } } else { if (pair == 2) { answer = "TWO PAIR"; } else if (pair == 1) { answer = "ONE PAIR"; } else answer = "NO HAND"; } Console.WriteLine(answer); } }