using System; using System.Collections.Generic; using System.Linq; public class P0227 { public static void Main() { var a = Console.ReadLine().Trim().Split(' ').Select(int.Parse).ToList(); var dict = new Dictionary(); foreach(int i in a) { dict[i] = dict.GetValueOrDefault(i) + 1; } if(dict.Count() == 2 && dict.Values.Max() == 3) { Console.WriteLine("FULL HOUSE"); } else if(dict.Count() == 3 && dict.Values.Max() == 3) { Console.WriteLine("THREE CARD"); } else if(dict.Count() == 3 && dict.Values.Max() == 2) { Console.WriteLine("TWO PAIR"); } else if(dict.Count() == 4 && dict.Values.Max() == 2) { Console.WriteLine("ONE PAIR"); } else { Console.WriteLine("NO HAND"); } } }