#include #include #include #include using namespace std; map a; int main(){ for(int i = 0; 5 > i; i++){ int t;cin>>t; a[t]+=1; } vector x; for(auto&& z:a){ x.push_back(z.second); } sort(x.begin(),x.end(),greater()); if(x[0] == 3){ if(x[1] == 2){ cout << "FULL HOUSE" << endl; }else{ cout << "THREE CARD" << endl; } }else if(x[0] == 2){ if(x[1] == 2){ cout << "TWO PAIR" << endl; }else{ cout << "ONE PAIR" << endl; } }else{ cout << "NO HAND" << endl; } }