import Data.List

main = do
  getLine
  ns <- sort . map read . words <$> getLine
  print $ solve ns

solve ns = step ns
  where
    step [] = 0
    step [a] = 1
    step (a:b:bs)
      | a == b = step (filter ((/= 0) . (`mod` a)) bs)
      | otherwise = 1 + step (filter ((/= 0) . (`mod` a)) (b:bs))