main = do
    n <- readLn
    putStr (show n ++ ": ")
    putStrLn $ unwords.map show.primeFactorize $ n
primeFactorize :: Integer -> [Integer]
primeFactorize n = pf n primes

pf :: Integer -> [Integer] -> [Integer]
pf n (x:xs)
  | x > n = []
  | isPrime n = [n]
  | modnx == 0 = x : pf divnx (x:xs)
  | otherwise = pf n xs
  where (divnx, modnx) = divMod n x

primes :: [Integer]
primes = 2 : filter isPrime [3,5..]

isPrime :: Integer -> Bool
isPrime n = all (/= 0).map (mod n).takeWhile (<= sqrtn) $ primes
    where sqrtn = floor.sqrt.fromIntegral $ n