#include using namespace std; int a, c[14]; int main() { for(int i = 0; i < 5; i++) cin >> a, c[a]++; vector v; for(int i = 1; i <= 13; i++) { if(c[i] >= 2) v.push_back(i); } sort(v.begin(), v.end(), greater()); if(v == vector({3, 2})) puts("FULL HOUSE"); else if(v == vector({3})) puts("THREE CARD"); else if(v == vector({2, 2})) puts("TWO PAIR"); else if(v == vector({2})) puts("ONE PAIR"); else puts("NO HAND"); return 0; }