import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] name = {"FULL HOUSE","TWO PAIR","THREE CARD","ONE PAIR","","NO HAND"}; int count[]=new int [13]; for(int i=0;i<5;i++){ count[sc.nextInt()-1]++; } int s = 5; for(int i=0;i<13;i++){ if(count[i] == 2) s-=2; if(count[i] == 3) s-=3; } System.out.println(name[s]); } }