yaku = ["FULL HOUSE","THREE CARD","TWO PAIR","ONE PAIR","NO HAND"] cnt = [0,0,0,0,0,0,0,0,0,0,0,0,0,0] hand = [int(i) for i in input().split()] for num in hand: cnt[num] += 1 if cnt.count(3) and cnt.count(2): print(yaku[0] + "\n") if cnt.count(3) and not cnt.count(2): print(yaku[1] + "\n") if cnt.count(2) == 2: print(yaku[2] + "\n") if cnt.count(2) == 1: print(yaku[3] + "\n") if cnt.count(1) == 5: print(yaku[4] + "\n")