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 n=0;n<5;n++){ a[n] = sc.nextInt(); } Arrays.sort(a); int sameSum = 0; for(int l=0;l<4;l++){ for(int m=1;m<=4-l;m++){ if(a[l] == a[l+m]){ sameSum++; } } } switch(sameSum){ case 1: System.out.println("ONE PAIR"); break; case 2: System.out.println("TWO PAIR"); break; case 3: System.out.println("THREE CARD"); break; case 4: System.out.println("FULL HOUSE"); break; default: System.out.println("NO HAND"); break; } } }