#include using namespace std; int main(){ map mp; int a; for(int i = 0; i < 5; i++){ cin >> a; mp[a]++; } int mx = 0; int nxt = 0; for(auto a : mp){ if(a.second > mx){ nxt = mx; mx = a.second; } else if(a.second > nxt)nxt = a.second; } if(mx == 3 && nxt == 2)cout << "FULL HOUSE" << endl; else if(mx == 3)cout << "THREE CARD" << endl; else if(mx == 2 && nxt == 2)cout << "TWO PAIR" << endl; else if(mx == 2)cout << "ONE PAIR" << endl; else cout << "NO HAND" << endl; }