A = map(int, raw_input().split()) A.sort() deg = [0] * 14 for x in A: deg[x] += 1 if (deg.count(3) and deg.count(2)): print "FULL HOUSE" elif (deg.count(3)): print "THREE CARD" elif (deg.count(2) == 2): print "TWO PAIR" elif (deg.count(2) == 1): print "ONE PAIR" else: print "NO HAND"