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