#include #define LL long long #define ULL unsigned long long #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); vector vc(5); for( auto&& x : vc ) { cin >> x; } vector res(14); int sum{}; for( const auto& x : vc ) { sum += ++res[x]; } cout << ( sum == 9 ? "FULL HOUSE" : sum == 8 ? "THREE CARD" : sum == 7 ? "TWO PAIR" : sum == 6 ? "ONE PAIR" : "NO HAND" ) << endl; return 0; }