#include using namespace std; int main() { vector v(13); for (int i = 0; i < 5; i++) { int n; cin >> n; v.at(n - 1)++; } sort(v.begin(), v.end()); reverse(v.begin(), v.end()); int n1 = v.at(0), n2 = v.at(1), n3 = v.at(2); if (n1 == 3 && n2 == 2) { cout << "FULL HOUSE" << endl; } else if (n1 == 3 && n2 == 1) { cout << "THREE CARD" << endl; } else if (n1==2 && n2 == 2) { cout << "TWO PAIR" << endl; } else if (n1==2 && n2==1) { cout << "ONE PAIR" << endl; } else { cout << "NO HAND" << endl; } }