#include #define rep(i,n) for(int i=0; i<(n); i++) #define fore(i,a) for(auto &i:a) using namespace std; typedef long long ll; int main(){ vector v(14, 0); rep(i,5){ int n; cin>>n; v[n]++; } auto it=remove(v.begin(), v.end(), 0); auto r=distance(it, v.end()); v.erase(it, v.end()); int t=v.size(); if(t==2) cout << "FULL HOUSE" << endl; else if(t==3&&*max_element(v.begin(), v.end())==3) cout << "THREE CARD" << endl; else if(t==3&&*max_element(v.begin(), v.end())==2) cout << "TWO PAIR" << endl; else if(t==4) cout << "ONE PAIR" << endl; else cout << "NO HAND" << endl; }