import collections 

n,cc = int(input()), collections.Counter(list(map(int,input().split())))

m,s = max(cc.keys()),{ai:True for ai in cc}

for a in cc:

	c = a if cc[a] > 1 else 2 * a

	while(c <= m):

		if a in s: s[c] = False

		c += a

count = 0

for a in s:

	if s[a]: count +=1

print(count)
import collections 

n,cc = int(input()), collections.Counter(list(map(int,input().split())))

m,s = max(cc.keys()),{ai:True for ai in cc}

for a in cc:

	c = a if cc[a] > 1 else 2 * a

	while(c <= m):

		if a in s: s[c] = False

		c += a

count = 0

for v in list(s.values()):

	if v: count +=1

print(count)
import collections

n, cc = int(input()), collections.Counter(list(map(int, input().split())))
m, s = max(cc.keys()), {ai: True for ai in cc}
for a in cc:
    c = a if cc[a] > 1 else 2 * a
    while c <= m:
        if a in s:
            s[c] = False
        c += a
count = 0
for a in s:
    if s[a]:
        count += 1
print(count)

import collections

n, cc = int(input()), collections.Counter(list(map(int, input().split())))
m, s = max(cc.keys()), {ai: True for ai in cc}
for a in cc:
    c = a if cc[a] > 1 else 2 * a
    while c <= m:
        if a in s:
            s[c] = False
        c += a
count = 0
for v in list(s.values()):
    if v:
        count += 1
print(count)

-for a in s: -    if s[a]: +for v in list(s.values()): +    if v: