import java.util.Scanner; import java.util.Arrays; class main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int card[] = new int[13]; Arrays.fill(card, 0); for(int i = 0; i < 5; i++){ int num = scan.nextInt(); card[num - 1]++; } int thf = 0; int twf = 0; for(int i = 0; i < 13; i++){ if(card[i] == 3){ thf++; } else if(card[i] == 2){ twf++; } } if(thf == 1 && twf == 1){ System.out.println("FULL HOUSE"); } else if(thf == 1){ System.out.println("THREE CARD"); } else if(twf == 2){ System.out.println("TWO PAIR"); } else if(twf == 1){ System.out.println("ONE PAIR"); } else{ System.out.println("NO HAND"); } } }