import java.util.Scanner; public class No227 { 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[] cards = new int[13]; for(int i : a ){ cards[i]++; } int three = 0; int two = 0; for(int i : cards ){ if(i==3){ three++; }else if(i==2){ two++; } } if(three==1 && two==1 ){ System.out.println("FULL HOUSE"); }else if(three==1){ System.out.println("THREE CARD"); }else if(two==2){ System.out.println("TWO PAIR"); }else if(two==1){ System.out.println("ONE PAIR"); }else{ System.out.println("NO HANDR"); } } }