#include int main(void){ int i; int A, S[14] = {}; int num2 = 0, num3 = 0; for(i = 0; i < 5; i++){ scanf("%d", &A); S[A]++; } for(i = 1; i <= 13; i++){ if(S[i] == 2) num2++; if(S[i] == 3) num3++; } if(num2 == 1 && num3 == 1) printf("FULL HOUSE\n"); else if(num3 == 1) printf("TREE CARD\n"); else if(num2 == 2) printf("TWO PAIR\n"); else if(num2 == 1) printf("ONE PAIR\n"); else printf("NO HAND\n"); return 0; }