import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int [] A = new int [5]; for(int i=0; i<5; i++){ A[i] = sc.nextInt(); } int count=0; for(int i=0; i<5; i++){ for(int j=0; j<5; j++){ if(A[i]==A[j]){ count++; } } } if(count==13){ System.out.println("FULL HOUSE"); }else if(count==11){ System.out.println("THREE CARD"); }else if(count==9){ System.out.println("TWO PAIR"); }else if(count==7){ System.out.println("ONE PAIR"); }else{ System.out.println("NO HAND"); } } }