#include #include using namespace std; int main() { int a[14]={0},b; int n = 0,n2 = 0; string hand; for(int i=0; i<5; i++){ cin >> b; a[b]++; } for(int i=1; i<14; i++){ if(a[i] == 2) n++; if(a[i] == 3) n2++; } switch(n){ case 0: if(n2==1){ hand = "THREE CARD"; }else{ hand = "NO HAND"; } break; case 1: if(n2==1){ hand = "FULL HOUSE"; }else{ hand = "ONE PAIR"; } break; case 2: hand = "TWO PAIR"; break; default: break; } cout << hand << endl; return 0; }