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