using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace template { class Program { static void Main(string[] args) { int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); int[] cards = new int[14]; for (int i = 0; i < 5; i++) { cards[x[i]]++; } int[] ret = new int[6]; for (int i = 0; i <= 13; i++) { ret[cards[i]]++; } if (ret[3] == 1 && ret[2] == 1) Console.WriteLine("FULL HOUSE"); else if (ret[3] == 1) Console.WriteLine("THREE CARD"); else if (ret[2] == 2) Console.WriteLine("TWO PAIR"); else if (ret[2] == 1) Console.WriteLine("ONE PAIR"); else Console.WriteLine("NO HAND"); } } }