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++; } } if(three == 1 && two == 1) { System.out.println("FULL HOUSE"); } else if(three == 1) { System.out.println("THREE CARD"); } else if(two == 2) { System.out.println("TWO PAIR"); } else if(two == 1) { System.out.println("ONE PAIR"); } else { System.out.println("NO HAND"); } } }