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 cnt.count(1) == 2: print(yaku[1] + "\n") if cnt.count(2) == 2 and cnt.count(1) == 1: print(yaku[2] + "\n") if cnt.count(2) == 1 and cnt.count(1) == 3: print(yaku[3] + "\n") if cnt.count(1) == 5 and cnt.cout(5) == 1: print(yaku[4] + "\n")