#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { map m; for(int i=0; i<5; ++i){ int a; cin >> a; ++ m[a]; } vector v; for(const auto& p : m) v.push_back(p.second); sort(v.begin(), v.end()); if(v == vector({2, 3})) cout << "FULL HOUSE" << endl; else if(v == vector({1, 1, 3})) cout << "THREE CARD" << endl; else if(v == vector({1, 2, 2})) cout << "TWO PAIR" << endl; else if(v == vector({1, 1, 1, 2})) cout << "ONE PAIR" << endl; else cout << "NO HAND" << endl; return 0; }