import Control.Applicative ((<$>))
import Control.Monad (forM_)
import Data.List (sort, unfoldr)

main :: IO ()
main = do
  _ <- getLine
  xs <- sort . map read . words <$> getLine
  forM_ (solve xs) print
  
solve :: [Int] -> [Int]
solve = factors . foldr1 gcd

factors :: Int -> [Int]
factors n = [ n `div` k | k <- [n, n-1 .. 1], n `mod` k == 0 ]
