import Control.Applicative main :: IO() main = do n <- (read::String->Int) <$> getLine putStrLn $ unwords $ map show $ head [[i,n`div`i] | i<-[2..(floor (sqrt (fromIntegral n)))]++[1], n`mod`i==0]