import java.util.Scanner; public class m { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int cou[]=new int [13]; for(int i=0;i<5;i++){ cou[stdIn.nextInt()-1]++; } int p2=0; int p3=0; for(int i=0;i<13;i++){ if(cou[i]==2)p2++; else if(cou[i]==3)p3++; } if(p3==1&&p2==1){System.out.println("FULL HOUSE");} else if(p3==1){System.out.println("THREE CARD");} else if(p2==2){System.out.println("TWO PAIR");} else if(p2==1){System.out.println("ONE PAIR");} else System.out.println("NO HAND"); } }