module S = Set.Make (struct type t = string let compare = String.compare end) let () = let n = read_int () in let rec doit i s = if i * i > n then s else doit (i + 1) (if n mod i <> 0 then s else let x, y = string_of_int i, string_of_int (n / i) in S.(s |> add (x ^ y) |> add (y ^ x))) in doit 1 S.empty |> S.cardinal |> Printf.printf "%d\n"