#include using namespace std; int main(){ std::vector a(5); cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]; int rel=0; for(int i=0; i<5; i++){ int counter = 0; for(int j=i+1; j<5; j++){ if(a[i] == a[j]) counter++; } if(counter >= 1){ if(counter == 1){ rel++; } else{ rel += 3; } } } string s; if(rel == 1) s = "ONE PAIR"; else if(rel == 2) s = "TWO PAIR"; else if(rel == 4) s = "THREE CARD"; else if(rel == 5) s = "FULL HOUSE"; else s = "NO HANDS"; cout << s << endl; }