#include using namespace std; int main() { int cnt[14] = {}; for(int i=0; i<5; i++) { int a; cin >> a; cnt[a] ++; } int th = 0, tw = 0; for(int i=0; i<14; i++) { tw += cnt[i] == 2; th += cnt[i] == 3; } if(th == 1 && tw == 1) puts("FULL HOUSE"); else if(th == 1) puts("THREE CARD"); else if(tw == 2) puts("TWO PAIR"); else if(tw == 1) puts("ONE PAIR"); else puts("NO HAND"); return 0; }