#include #include #include #include #include #include using namespace std; int main() { vector card(14, 0); int a; for (int i = 0; i < 5; i++) { cin >> a; card[a]++; } int p2 = 0; int p3 = 0; for (int i = 1; i <= 13; i++) { switch (card[i]) { case 2: p2++; break; case 3: p3++; break; default: break; } } string hand; if (p3 == 1 && p2 == 1) { hand = "FULL HOUSE"; } else if (p3 == 1) { hand = "THREE CARD"; } else if (p2 == 2) { hand = "TWO PAIR"; } else if (p2 == 1) { hand = "ONE PAIR"; } else { hand = "NO HAND"; } cout << hand << endl; return 0; }