import std; void main() { auto A = readln.split.to!(int[]); int[int] card; iota(5).each!(i => card[A[i]]++); card.values.sort.array.predSwitch( [2, 3], "FULL HOUSE", [1, 1, 3], "THREE CARD", [1, 2, 2], "TWO PAIR", [1, 1, 1, 2], "ONE PAIR", "NO HAND").writeln; }