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