#include using namespace std; int main() { vector A(5); for (int i = 0; i < 5; i++) { cin >> A[i]; } vector count(14); for (int i = 0; i < 5; i++) { count[A[i]]++; } vector check2; vector check3; for (int i = 1; i <= 13; i++) { if (count[i] == 2) { check2.push_back(i); } if (count[i] == 3) { check3.push_back(i); } } if (check2.size() == 1 && check3.size() == 1) { cout << "FULL HOUSE"; } else if (check2.size() == 0 && check3.size() == 1) { cout << "THREE CARD"; } else if (check2.size() == 2) { cout << "TWO PAIR"; } else if (check2.size() == 1) { cout << "ONE PAIR"; } else { cout << "NO HAND"; } }