#include #include #include using namespace std; int main() { vector v(14); for (int i=0; i<5; i++) { int t; cin >> t; v[t]++; } sort(v.begin(), v.end(), greater()); if (v[0]==3 && v[1]==2) { cout << "FULL HOUSE" << endl; } else if (v[0]==3) { cout << "THREE CARD" << endl; } else if (v[0]==2 && v[1]==2) { cout << "TWO PAIR" << endl; } else if (v[0]==2) { cout << "ONE PAIR" << endl; } else { cout << "NO HAND" << endl; } return 0; }