#include main(){ int cards[5]; for(int i = 0;i < 5;i++){ scanf("%d",&cards[i]); } int pair = 0; int tpair = 0; for(int j = 0;j < 4;j++){ if(cards[j] == -1){ continue;} int target = cards[j]; cards[j] = -1; int count = 1; for(int i = j+1;i < 5;i++){ if(cards[i] == target){ cards[i] = -1; count++; } } if(count == 2){ pair++; }else if(count == 3){ tpair++; } } if(pair == 1 && tpair == 1){ printf("FULL HOUSE\n"); }else if(pair == 1){ printf("ONE PAIR\n"); }else if(pair == 2){ printf("TWO PAIR\n"); }else if(tpair == 1){ printf("THREE CARD\n"); }else{ printf("NO HAND\n"); } }