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