from collections import Counter



N, *A = list(map(int, open(0).read().split()))



C = Counter(A)

B = sorted(list(C.items()), key=lambda x: x[0])



lim = B[-1][0] + 1



memo = set()

ans = 0

for k, v in B:

    if k in memo:

        continue

    memo |= set(range(k, lim, k))

    ans += (v == 1)



print(ans)
N, *A = list(map(int, open(0).read().split()))



A.sort()

lim = A[-1] + 1



dp = [0] * lim

for a in A:

    dp[a] += 1

    if dp[a] == 1:

        for j in range(2 * a, lim, a):

            dp[j] += 2



print((dp.count(1)))
from collections import Counter

N, *A = list(map(int, open(0).read().split()))
C = Counter(A)
B = sorted(list(C.items()), key=lambda x: x[0])
lim = B[-1][0] + 1
memo = set()
ans = 0
for k, v in B:
    if k in memo:
        continue
    memo |= set(range(k, lim, k))
    ans += v == 1
print(ans)

N, *A = list(map(int, open(0).read().split()))
A.sort()
lim = A[-1] + 1
dp = [0] * lim
for a in A:
    dp[a] += 1
    if dp[a] == 1:
        for j in range(2 * a, lim, a):
            dp[j] += 2
print((dp.count(1)))

-from collections import Counter - -C = Counter(A) -B = sorted(list(C.items()), key=lambda x: x[0]) -lim = B[-1][0] + 1 -memo = set() -ans = 0 -for k, v in B: -    if k in memo: -        continue -    memo |= set(range(k, lim, k)) -    ans += v == 1 -print(ans) +A.sort() +lim = A[-1] + 1 +dp = [0] * lim +for a in A: +    dp[a] += 1 +    if dp[a] == 1: +        for j in range(2 * a, lim, a): +            dp[j] += 2 +print((dp.count(1)))