open System let sqrt n = let rec solve sm bg = // sm * sm <= n < bg * bg if bg - sm <= 1 then sm else let mid = (bg + sm) / 2 if mid * mid <= n then solve mid bg else solve sm mid solve 0 (n + 1) let factors n = [ for i in 1 .. sqrt n -> i ] |> List.filter (fun i -> n % i = 0) |> List.collect (fun i -> [ i n / i ]) |> List.sort |> List.distinct [] let main _ = let n = stdin.ReadLine() |> int let bs = factors n |> List.filter (fun b -> let m = (n / b) (sqrt m) * (sqrt m) = m) let b = bs |> List.min let a = sqrt (n / b) printfn "%d %d" a b 0