#coding=UTF-8 mojir=input() hyo=mojir.split(" ") deka=list(range(0,13,1)) for idx in range(0,13,1): deka[idx]=0 for mono in hyo: deka[int(mono)-1]=deka[int(mono)-1]+1 # print(deka) #sans et nis sans=0 nis=0 for idx in range(0,13,1): if deka[idx]==3: sans=sans+1 if deka[idx]==2: nis=nis+1 if sans==1 and nis==1: print("FULL HOUSE") elif sans==1: print("THREE CARD") elif nis==2: print("TWO PAIR") elif nis==1: print("ONE PAIR") else: #ブタ(ブタじゃない) print("NO HAND")