#define _GLIBCXX_DEBUG #include using namespace std; int main() { vector A(5), B(0); for(int i = 0; i < 5; i++){ cin >> A[i]; bool flag = true; for(int j = 0; j < (int)B.size(); j++){ if(A[i] == B[j]) flag = false; } if(flag) B.push_back(A[i]); } sort(A.begin(), A.end()); if((int)B.size() == 2) cout << "FULL HOUSE" << endl; else if((int)B.size() == 3){ if(A[0] == A[2] or A[1] == A[3] or A[2] == A[4]) cout << "THREE CARD" << endl; else cout << "TWO PAIR" << endl; }else if((int)B.size() == 4) cout << "ONE PAIR" << endl; else cout << "NO HAND" << endl; }