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