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