stdin.ReadLine().Split(' ') |> Array.toList |> List.groupBy id |> List.map(fun (a,b) -> b.Length) |> List.sort |> function | [2;3] -> "FULL HOUSE" | [1;1;3] -> "THREE CARD" | [1;2;2] -> "TWO PAIR" | [1;1;1;2] -> "ONE PAIR" | _ -> "NO HAND" |> printfn "%s"