#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { map m; for (int i = 0; i < 5; i++) { int t; cin >> t; m[t]++; } int sta[3] = {}; map::iterator it = m.begin(); while (it != m.end()) { if ((*it).second == 3) { sta[0] = 1; } if ((*it).second == 2) { if(sta[1] == 0) sta[1] = 1; else sta[2] = 1; } it++; } if (sta[0] == 1 && sta[1] == 1) { cout << "FULL HOUSE" << endl; } else if (sta[0] == 1) { cout << "THREE CARD" << endl; } else if (sta[1] == 1 && sta[2] == 1) { cout << "TWO PAIR" << endl; } else if (sta[1] == 1) { cout << "ONE PAIR" << endl; } else { cout << "NO HAND" << endl; } return 0; }