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