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 = seq { for i in 1 .. sqrt n -> i } |> Seq.filter (fun i -> n % i = 0) |> Seq.collect (fun i -> seq { yield i yield n / i }) |> Seq.sort |> Seq.distinct [] let main _ = let n = stdin.ReadLine() |> int let bs = factors n |> Seq.filter (fun b -> let m = (n / b) (sqrt m) * (sqrt m) = m) let b = bs |> Seq.sort |> Seq.head let a = sqrt (n / b) printfn "%d %d" a b 0