#include using namespace std; #define NUM 14 int num[NUM]; int main(){ int A = 0; for(int i=1; i<6; i++){ cin >> A; num[A]++; } int cnt = 0; for(int i=1; i<=13; i++){ for(int j=1; j<=13; j++){ if(num[i] == 3){ if(num[j] == 2){ cout << "FULL HOUSE" << endl; cnt++; break; } cout << "THREE PAIR" << endl; cnt++; break; } if(num[i] == 2){ if(num[j] == 2 && i != j){ cout << "TWO PAIR" << endl; cnt++; break; } cout << "ONE PAIR" << endl; cnt++; break; } } } if(cnt == 0) cout << "NO HAND" << endl; return 0; }