using System; public class Program { public static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int[] card = new int[s.Length]; for (int i = 0; i < card.Length; i++) { card[i] = int.Parse(s[i]); } Array.Sort(card); int pair = 0; int max = 1; for (int i = 0; i < card.Length; i++) { bool flag = false; int count = 1; for (int j = i + 1; j < card.Length; j++) { if (card[i] == card[j]) { flag = true; count++; i++; } else { break; } } if (flag) { pair++; if (count > max) { max = count; } } } if (max == 3 && pair == 2) { Console.WriteLine("FULL HOUSE"); } else if (max == 3 && pair == 1) { Console.WriteLine("THREE CARD"); } else if (max == 2 && pair == 2) { Console.WriteLine("TWO PAIR"); } else if (max == 2 && pair == 1) { Console.WriteLine("ONE PAIR"); } else { Console.WriteLine("NO HAND"); } } }