import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Ord

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    as <- sortOn Down <$> getIntList
    let ps = zip as (tail (tails as))
    print $ length [ x |(x,xs) <- ps, all ((/= 0) . (x `mod`)) xs, length (filter (==x) as) == 1]