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