a[14],s[6],i;main(){for(;~scanf("%d",&i);a[i]++);for(i=1;i<14;s[a[i++]]++);i=!puts(s[3]?s[2]?"FULL HOUSE":"THREE CARD":s[2]?s[2]-2?"TWO":"ONE"" PAIR":"NO HAND");}