using System; namespace yukicoder { class Program { static void Main(string[] args) { string[] a = Console.ReadLine().Split(' '); int[] b = new int[13]; int count3 = 0; int count2 = 0; for(int i = 0; i < a.Length; i++) { int c = int.Parse(a[i]); for(int j = 1; j <= 13; j++) { if (j == c) { b[j - 1] += 1; break; } } } for(int x = 0; x <= 12; x++) { if (b[x] == 3) { count3++; } else if(b[x] == 2) { count2++; } } if (count3 == 1 && count2 == 1) { Console.WriteLine("FULL HOUSE"); } else if (count3 == 1) { Console.WriteLine("THREE CARD"); } else if (count2 == 2) { Console.WriteLine("TWO PAIR"); } else if (count2 == 1) { Console.WriteLine("ONE PAIR"); } else { Console.WriteLine("NO HAND"); } } } }