let () = let lst = Scanf.scanf "%d %d %d %d %d\n" @@ fun a b c d e -> [a;b;c;d;e] in let [a;b;c;d;e] = List.fast_sort compare lst in Printf.printf "%s\n" (if (a = b && b = c && d = e) || (a = b && c = d && d = e) then "FULL HOUSE" else if (a = b && b = c && c <> d) || (a <> b && b = c && c = d && d <> e) || (b <> c && c = d && d = e) then "THREE CARD" else if (a = b && (c = d || d = e)) || (b = c && d = e) then "TWO PAIR" else if a = b || b = c || c = d || d = e then "ONE PAIR" else "NO HAND")