#include using namespace std; signed main(){ vector< int > card( 5 ); for( int i = 0; i < 5; ++i ) cin >> card[ i ]; vector< int > cnt( 13 + 1 ); vector< int > cnt_cnt( 5 + 1 ); for( int i = 0; i < 5; ++i ) ++cnt[ card[ i ] ]; for( int i = 1; i <= 13; ++i ) ++cnt_cnt[ cnt[ i ] ]; if( cnt_cnt[ 3 ] and cnt_cnt[ 2 ] ) cout << "FULL HOUSE" << endl; else if( cnt_cnt[ 3 ] ) cout << "THREE CARD" << endl; else if( cnt_cnt[ 2 ] == 2 ) cout << "TWO PAIR" << endl; else if( cnt_cnt[ 1 ] ) cout << "ONE PAIR" << endl; else cout << "NO HAND" << endl; return 0; }