defmodule Main do def main do IO.read(:line) |> String.trim() |> String.split() |> Enum.map(&String.to_integer/1) |> solve |> IO.puts() end def solve(a) do a |> Enum.group_by(& &1) |> Map.values() |> Enum.map(&length/1) |> Enum.sort() |> judge end def judge(l) do case l do [2, 3] -> "FULL HOUSE" [1, 1, 3] -> "THREE CARD" [1, 2, 2] -> "TWO PAIR" [1, 1, 1, 2] -> "ONE PAIR" _ -> "NO HAND" end end end