let factorize n = let rec go x i = if i * i > x then [x] elif x % i = 0L then i :: go (x / i) i else i + 1L |> go x go n 2L let rec ab a b xs = let len = List.length xs if len = 0 then [| a; b |] elif len = 1 then [| a; b * xs.[0] |] else let x :: y :: ys = xs if x = y then ab (a * x) b ys else ab a (b * x) (y :: ys) let n = stdin.ReadLine() |> int64 factorize n |> ab 1L 1L |> fun ans -> printfn "%d %d" ans.[0] ans.[1]