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