#include #include using namespace std; int a[5]; map ans; void solve(){ for(auto val : a){ ans[val]+=1; } int cnt = 0; for(auto x: ans){ if(x.second!=1&&x.second<=3) cnt+=x.second; } switch(cnt){ case 5: cout << "FULL HOUSE" << endl; break; case 3: cout << "THREE CARD" << endl; break; case 4: cout << "TWO PAIR" << endl; break; case 2: cout << "ONE PAIR" << endl; break; default: cout << "NO HAND" << endl; } } int main(){ cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; solve(); }