import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] countArray = new int[14]; for(int i = 0; i<5; i++) { int a = scan.nextInt(); countArray[a] += 1; } int three = 0; int two = 0; for(int count : countArray) { if(count == 3) { three++; } else if(count == 2) { two++; } } String[][] hand = { {"NO HAND", "ONE PAIR", "TWO PAIR"}, {"THREE CARD", "FULL HOUSE", ""} }; System.out.println(hand[three][two]); } }