import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count[] = new int[13]; for(int i=0; i<5; i++){ count[sc.nextInt()-1]++; } sc.close(); String yaku[] = {"NO HAND", "ONE PAIR", "TWO PAIR", "THREE CARD", "FULL HOUSE"}; int no = 0; for(int i=0; i<13; i++){ if(count[i] == 2){ no++; } if(count[i] == 3){ no+=3; } } System.out.println(yaku[no]); } }