#include using namespace std; int main(){ int ch[14]={},a[5],ans=0; for(int i=0; i<5; i++) cin >> a[i]; for(int i=0; i<5; i++) ch[a[i]]++; sort(ch,ch+14); reverse(ch,ch+14); //for(int i=0; i<14; i++) cout << ch[i] << endl; if(ch[0]==3){ if(ch[1]==2) cout << "FULL HOUSE"; else cout << "THREE CARD"; } else if(ch[0]==2){ if(ch[1]==2) cout << "TWO PAIR"; else cout << "ONE PAIR"; } else cout << "NO HAND"; cout << endl; }