#include #include using namespace std; int main() { int a[5],count1=0,count2=0,count3=0; for (int i = 0; i < 5; i++) { cin>>a[i]; } sort(a, a + 5); for (int i = 0; i < 5; i++) { if (a[i] == a[i + 1]) { count1++; } else if (a[i] < a[i + 1]) { count2++; } if (a[i] == a[i + 1]&&a[i+1] == a[i + 2]) { count3++; } } if (count1 ==0) { cout << "NO HAND" << endl; } else if (count1 == 1) { cout << "ONE PAIR" << endl; } else if (count1 == 3) { cout << "FULL HOUSE" << endl; } else if (count1 == 2 && count2 == 2&&count3==1) { cout << "THREE CARD" << endl; } else if (count1 == 2 && count2 == 2) { cout << "TWO PAIR" << endl; } return 0; }