#include #include using namespace std; int main(void) { vector cards(13, 0); int a; for (int i = 0; i < 5; ++i) { cin >> a; --a; ++cards[a]; } int two = 0, three = 0; for (int i = 0; i < 13; ++i) { if (cards[i] == 2) ++two; else if (cards[i] == 3) ++three; } string ans = "NO HAND"; if (three == 1 && two == 1) ans = "FULL HOUSE"; else if (three == 1) ans = "THREE CARD"; else if (two == 2) ans = "TWO PAIR"; else if (two == 1) ans = "ONE PAIR"; cout << ans << endl; return 0; }