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