#include #include int main() { std::map mp; int a3 = 0, a2 = 0; for (int i = 0; i < 5; i++) { int t; std::cin >> t; mp[t]++; } for (int i = 0; i < 14; i++) { if (3 == mp[i]) a3++; if (2 == mp[i]) a2++; } if (1 == a3 && 1 == a2) { std::cout<< "FULL HOUSE" << std::endl; } else if (1 == a3){ std::cout<< "THREE CARD" << std::endl; } else if (2 == a2) { std::cout<< "TWO PAIR" << std::endl; } else if (1 == a2) { std::cout<< "ONE PAIR" << std::endl; } else { std::cout<< "NO HAND" << std::endl; } }