import Data.List

main :: IO ()
main = do
    _ <- getLine
    ts <- getInts
    print $ solve ts

getInts :: IO [Int]
getInts = map read . lines <$> getContents

solve :: [Int] -> Int
solve = foldr1 lcm . sort
