#include #include #include #include #include using namespace std; int main(){ vector A; int x,count=0; bool flag1,flag2; for(int i=0;i<5;i++){ cin >> x; A.push_back(x); } A.push_back(0); for(int i=0;i<5;i++){ if(A[i]==A[i+1]){ count++; } if(A[i]!=A[i+1]){ if(count==2) flag1 = 1; else if(count==3) flag2 = 1; count = 0; } } if(flag1==1&&flag2==1) cout << "FULL HOUSE"; else if(flag1==1) cout << "TWO PAIR"; else if(flag2==1) cout << "THREE CARD"; else cout << "NO HAND"; return 0; }