#include using namespace std; int main(void) { map mp; for (int i = 0; i < 5; i++) { int a; cin >> a; mp[a]++; } int maxc = 0; for (auto i : mp) { maxc = max(maxc, i.second); } if (mp.size() == 2 && maxc == 3) { cout << "FULL HOUSE\n"; } else if (mp.size() == 3) { cout << (maxc == 3 ? "THREE CARD" : "TWO PAIR") << endl; } else if (mp.size() == 4 && maxc == 2) { cout << "ONE PAIR\n"; } else { cout << "NO HAND\n"; } return 0; }