#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define INF (1 << 30) #define INFLL (1LL << 60) #define PI 3.14159265359 int main() { int a[14] = {}; int b; for(int i = 0;i < 5;i++){ cin >> b; a[b]++; } int ni = 0,san = 0; for(int i = 0;i < 14;i++){ if(a[i] == 3) san++; else if(a[i] == 2) ni++; } if(san == 1 && ni == 1){ cout << "FULL HOUSE" << endl; }else if(san == 1){ cout << "THREE CARD" << endl; }else if(ni == 2){ cout << "TWO PAIR" << endl; }else if(ni == 1){ cout << "ONE PAIR" << endl; }else{ cout << "NO HAND" << endl; } return 0; }