#include #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define SZ(n) (int)(n).size() #define ALL(n) (n).begin(), (n).end() using namespace std; typedef long long LL; typedef vector VI; int main() { int a[5]; REP(i, 5) cin >> a[i]; int k[13] = {}; REP(i, 5) k[a[i]]++; sort(k, k + 13, greater()); if (k[0] == 3) { if (k[1] == 2) { cout << "FULL HOUSE" << endl; return 0; } cout << "THREE CARD" << endl; return 0; } if (k[0] == 2) { if (k[1] == 2) { cout << "TWO PAIR" << endl; return 0; } cout << "ONE PAIR" << endl; return 0; } cout << "NO HAND" << endl; return 0; }