import strutils, sequtils, tables var dic = initCountTable[int]() flg = 0 let A = stdin.readline.split.map parseInt for v in A: dic.inc(v) for k, v in dic: if v != 1 and v < 4: flg += v case flg: of 5: echo "FULL HOUSE" of 3: echo "THREE CARD" of 4: echo "TWO PAIR" of 2: echo "ONE PAIR" else: echo "NO HAND"