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