#include #define int long long using namespace std; using Graph = vector>; signed main(){ map num; for( int i = 0; i < 5; i++ ){ int A; cin >> A; if( num.count(A) ) num.at(A)++; else num[A] = 1; } int two = 0; int three = 0; for( auto p : num ){ if( p.second == 2 ) two++; else if( p.second == 3 ) three++; } if( two == 1 && three == 0 ) cout << "ONE PAIR" << endl; else if( two == 2 ) cout << "TWO PAIR" << endl; else if( two == 0 && three == 1 ) cout << "THREE CARD" << endl; else if ( three == 1 && two == 1 ) cout << "FULL HOUSE" << endl; else cout << "NO HAND" << endl; }