import java.util.Arrays; import java.util.Scanner; public class Main_yukicoder227 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] cards = new int[13]; for (int i = 0; i < 5; i++) { int a = sc.nextInt(); cards[a]++; } Arrays.sort(cards); if (cards[12] == 3 && cards[11] == 2) { System.out.println("FULL HOUSE"); } else if (cards[12] == 3 && cards[11] == 1) { System.out.println("THREE CARD"); } else if (cards[12] == 2 && cards[11] == 2) { System.out.println("TWO PAIR"); } else if (cards[12] == 2 && cards[11] == 1) { System.out.println("ONE PAIR"); } else { System.out.println("NO HAND"); } sc.close(); } }