#include #include #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define vi vector int main() { int count[13] = {0}; rep(i, 5) { int a; cin >> a; count[a-1]++; } bool exists_three = false; int two_count = 0; rep(i, 13) { if (count[i] == 3) { exists_three = true; } if (count[i] == 2) { two_count++; } } if (exists_three && two_count == 1) { cout << "FULL HOUSE" << endl; } else if (exists_three) { cout << "THREE CARD" << endl; } else if (two_count == 2) { cout << "TWO PAIR" << endl; } else if (two_count == 1) { cout << "ONE PAIR" << endl; } else { cout << "NO HAND" << endl; } }