peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())
array = list(map(int, input().split()))

array = list(set(array) - set([x for x in set(array) if array.count(x) > 1]))
array.sort()

dup = []

i = 0;
while(i < len(array)):
    if(array[i] in dup):
        del(array[i])
    else:
        dup = dup + [j * array[i] for j in range(2, int(array[-1] / array[i] + 1))]
        i += 1
    
print(len(array))
n=int(input())
a=sorted(list(map(int,input().split())))

max=a[-1]
ans=0
if(len(a)!=len(set(a))):ans-=1
primeNum = []
while a:
    primeNum.append(a[0])
    tmp=a[0]
    a=[i for i in a if i % tmp != 0]
primeNum.extend(a)
ans+=len(primeNum)


print(ans)
import numpy as np
n = int(input())
aa = list(map(int, input().split()))
aa.sort()

from collections import Counter
dic = Counter(aa)
times = np.array(list(dic.keys()))[np.array(list(dic.values())) > 1]

aa = list(set(aa) - set(times))
oks = np.ones(len(aa))
for i in range(len(aa)):
    for j in range(i+1,len(aa)):
        if (aa[j]%aa[i] == 0):
            oks[j] = 0
print(int(oks.sum()))
n = int(input())
A = list(map(int, input().split()))

A.sort(reverse=True)
ans = 0

for i in range(n-1):
    for j in range(i+1, n):
        if A[i] % A[j] == 0:
            break
    else:
        ans += 1
if n >= 2 and A[-2] != A[-1]:
    ans += 1

print(ans)
a = []
cnt = 0

n = int(input())
a = list(map(int, input().split()))
a = sorted(a)

for i in range(n):
    for j in range(n):
        if i == j:
            break
        if a[i] != a[j] and a[i] % a[j] == 0:
            cnt += 1
            break

if cnt == 0:
    print(0)
else:
    print(n-cnt)
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
count = 1
for i in range(N-1):
  flag = 1
  for j in range(N-1, i, -1):
    if A[i] / 2 <  A[j]:
      break
    if A[i] % A[j] == 0:
      flag = 0
      break
  if flag:
      count += 1
if N == 1:
  print(1)
elif A[0] == A[1] and count == N:
  print(0)
else:
  print(count)
n = int(input())
a = list( map(int,input().split()) ) 

b = sorted(a)

ans =0
for i in range(len(b)):
    c =[k%b[i] for k in a]
    count = c.count(0)
    if count == 1:
        ans += 1
        
print(ans)
N = int(input())
A = list(map(int, input().split()))

All = set(A)
count, ans = 0, 0

for i in A:
    division = [i]
    split = All - set(division)
    count = 0
    for j in split:
        if(i % int(j) != 0 and i != int(j)):
            count = count + 1
            if(count == len(split)):
                ans = ans + 1

print(ans)
N=int(input())
A = [int(x) for x in input().split()]
A.sort()
n=0

for i in range(N):
  for j in range(N-i-1):
    if A[N-i-1]%A[j]==0:
      print(A[N-i-1],A[j])
      n=n+1
      break
print(N-n)

"""
10
33 18 45 28 8 19 89 86 2 4
5
"""
from typing import List


def not_divisible(A: List[int]) -> int:
    A = sorted(A)
    B = []
    for a in A:
        for b in B:
            # print("{} % {} = {}".format(a, b, a % b))
            if not (a % b):
                # print("break")
                break
        else:
            B.append(a)

    return len(B)


if __name__ == "__main__":
    _ = int(input())
    A = [int(a) for a in input().split()]
    ans = not_divisible(A)
    print(ans)
import numpy as np

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

N = int(input())
List = list(map(int,input().split()))
List.sort()
List2= []

for i in range(N-1):
  a = List[i]
  b = List[i+1]
  if a != b:
    List2.append(a)

if List2 == []:
  print(0)
elif len(List2) == 1:
  print(1)
else:
  ans = [List2[0]]

  for i in range(1,len(List2)):
    a = List2[i]
    b = np.gcd(a, ans)
    if max(b) == 1:
      ans.append(a)
  print(len(ans))
n=int(input())
As = list(map(int, input().split()))
i=0
j=0
count =0
for a in As:
    for b in As:
        if i!=j:
            if a%b==0:
                break
            elif j==n-1:
                count+=1
        j+=1
    i+=1
    j=0

print(count)
n = input()
a = list(map(int,input().split()))

a = list(set(a))
a.sort()

b=[]

if len(a) <= 1:
    print(0)

else:
    for i in range(len(a)):
        for i2 in range(i+1,len(a)):
            if a[i2]%a[i] == 0:
                b.append(a[i2])
    c = [x for x in a if x not in b]
    print(len(c))
from collections import Counter
teisuu1=10**6
N=int(input())
A=list(map(int,input().split()))
count_A=Counter(A)
dp=[True]*(teisuu1+1)
s=list(set(A))
for i in s:
  temp=i*2
  while temp<=s[-1]:
    dp[temp]=False
    temp+=i
ans=0
for i in A:
  if count_A[i]==1 and dp[i]==True:
    ans+=1
print(ans)
from collections import Counter
N=int(input())
A=list(map(int,input().split()))
A=sorted(A)[::-1]
if Counter(A)[A[-1]]>1:
    ans=-1
else:
    ans=0
B=[]
while A:
    x=A.pop()
    B.append(x)
    for i in A[::-1]:
        if i%x==0:
            A.remove(i)
print(len(B)+ans)
N = int(input())
A = list(map(int,input().split()))
dp = [True]*(max(A)+1)
for i in range(1, max(A)+1):
  if i in A and dp[i] != False:
    for j in range(i,max(A)+1):
      if j % i == 0 and j != i:
        dp[j] = False
cnt = 0
for a in A:
  if dp[a] == True:
    cnt += 1
print(cnt)
N = int(input())
num_list = list(map(int, input().split()))
count=0


for i in range(N):
  for j in range(N):
    if i == j:
      break
    if num_list[i] % num_list[j]==0:
      count = count + 1
      break

print(N-count)
N = int(input())
a = list(map(int,input().split()))
A = sorted(a, reverse=True)
count = 0
print(A)
if A[N-1] % A[N-2] != 0:
  count += 1
for i in range(N-1):
  flag = False
  for j in range(i+1,N):
    if i != j:
      if A[i] % A[j] == 0:
        flag = True
        break
  if flag == False:
    count += 1
print(count)
n = input()
a = list(map(int,input().split()))
a = list(set(a))
a.sort()

b=[]


while True:    
    if len(a) == 0:
        break
    i = a.pop(0)
    a = [x for x in a if x%i != 0]
    b.append(i)

    
print(len(b))
import numpy as np
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)
count = 0
for n in np.array(range(N)):
    if n != N-1:
        L_s = L[n+1:]
    else:
        L_s = L[n:]
    for l_s in L_s:
        if L[n]%l_s == 0:
            break
    else:
        count += 1

print(count)
n = int(input())
arr = [int(x) for x in input().split()]

cset = set(arr)

mxN = 10**6 + 1
rp = [True]*mxN


oarr = set()
for x in arr:
  if x in oarr:
    oarr.remove(x)
    rp[x] = False
  else:
    oarr.add(x)


for i in range(2,len(rp)):
  if i not in cset or not rp[i]:continue
  for j in range(i+i,mxN,i):
    if j in arr: rp[j] = False

for x in cset:
  if x not in oarr:rp[x] = False

ans = sum([(1 if rp[x] else 0) for x in arr])
print(ans)
N = int(input())
A = sorted(list(map(int,input().split())))
amax = A[-1]
P = [0 for _ in range(amax+1)]
for i in range(N):
    P[A[i]] = 1
for i in range(N):
    a = A[i]
    for j in range(a*2,amax+1,a):
        P[j] = 0
print(sum(P))
N = int(input())
As = list(map(int, input().split()))
 
ttable = [[False for i in range(N)] for j in range(N)]
 
for i in range(N):
  for j in range(i+1, N):
    if As[i] == As[j]:
      ttable[i][j] = True
      ttable[j][i] = True
    elif As[i] % As[j] == 0:
      ttable[i][j] = True
    elif As[j] % As[i] == 0:
      ttable[j][i] = True

print(ttable)
cnt = 0
for i in range(N):
  if True not in ttable[i]:
    cnt += 1

print(cnt)
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse = True)
p = 0

for i in range(n):
    j = i + 1
    while j < n:
        if i == j:
            pass
        elif a[i] % a[j] == 0:
            break
        else:
            pass
        if j == n - 1:
            p += 1
        j += 1

print(p+1)
n = int(input())
A = list(map(int,input().split()))
ans = 0
B = A
A.sort()
if A[0] == 1:
  print(1)
elif [i for i in A if i % A[0] != 0] == []:
  print(0)
else:
 while True:
    A = [i for i in A if i % A[0] != 0]
    if B == A:
      print(ans)
      break
    else:  
      ans +=1
      B = A
n = int(input())
a = sorted(list(map(int, input().split())))
if(len(list(set(a)))==1 and len(a)!=1):print(0);exit()
ans = []
num = 0
for i in a:
    b = True
    for j in ans:
        if(i%j == 0):
            b = False
            break
    if(b):
        ans.append(i)
        num+=1
print(num)
import numpy as np
N=int(input())
A=np.array(list(map(int,input().split())))
A=np.sort(A)[::-1]
#print(A)

ans=0
for i in range(N):
    #print(A[i],A[i+1:])
    if np.any([i]%A[i+1:]==0):
        ans+=1
print(ans)
N = int(input())
A = list(map(int, input().split()))
cnt = 0
 
A.sort(reverse=True)
for i in range(N-1):
  for j in range(i+1, N):
    if A[i] % A[j] == 0:
      cnt-=1
      break
  cnt += 1
      
print(cnt)
n = int(input())
A = list(set(map(int, input().split())))
A.sort(reverse=True)

count = 0
for i, Ai in enumerate(A):
  flag = 0
  for Aj in A[i:]:
    if Ai == Aj:
      continue
    if (Ai % Aj) == 0:
      flag = 1
      break
  if flag == 0:
    count += 1
if len(A) == 1:
  print(0)
else:
  print(count)
n = int(input())
a = list(map(int,input().split()))
a = list(set(a))
a.sort(reverse=True)
n=len(a)
counter = 0
if n==1:
  print(counter)
else:
  for i in range(n):
    start = 0
    for j in range(i+1,n):
      if a[i] % a[j] == 0:
        start = 1
        break
    if start == 0:
      counter+=1
  print(counter)
import collections
n = int(input())
a = list(map(int,input().split()))
c = collections.Counter(a)
p = sorted(c.items())
ans = 0
kouho = set()

for k ,v in p:
    if v != 1:
        kouho.add(k)
        continue
    m = k
    flag = False
    for i in range(2,int(m**0.5)+1):
        if m%i == 0:
            if i in kouho or m//i in kouho:
                flag = True
                break
    if not flag:
        ans += 1
    kouho.add(m)
print(ans)
n=int(input())
arr= list(map(int,input().split(' ')))
arr.sort()
count=0
d= [True for i in range(1000001)]
if arr.count(arr[0])!=n:
    for i in range(n):
        curr= arr[i]
        if d[curr]==True:
            count+=1
            db= curr*2
            while db<=1000000:
                d[db]=False
                db+=curr
    print(count)
else:
    print(0)
n=int(input())
a=list(map(int,input().split()))
a=list(set(a))
a.sort()

if len(a)==1:
    print(0)
elif 1 in a:
    print(1)
else:
    counter=0
    counter_set=set()
    for i in range(len(a)):
        for j in (range(i)):
            if a[i]%a[j]==0:
                break
        else:
            counter+=1
            counter_set.add(a[i])
    print(counter)
lst=[]
c=0
flag=0
n = int(input())
str = input()
lst = str.split(' ')
for i in range(0,n):
  lst[i] = int(lst[i])
lst.sort()
print(lst)
for i in range(0,n):
  flag=0
  for j in range(0,i):
    
    if  lst[i]%lst[j]==0:
      flag=1
      j=i
  if flag==0:
    c = c+1
print(c)
N = int(input())
A = list(map(int, input().split()))
A.sort()

sosu = []
count = 0
for i in range(len(A)):
  if (i != len(A)-1 and A[i] == A[i+1]) or (i != 0 and A[i] == A[i-1]):
    continue
  for s in sosu:
    if A[i] % s == 0:
      break
  else:
    count+=1
    sosu.append(A[i])
print(count)
n=int(input())
a=list(map(int,input().split()))
count_a=0
a.sort(reverse=True)
for i in range(n-1):
    count_b=0
    for j in range(n-i-1):
        k=j+i+1
        if a[i]%a[n-k]==0:
            count_b+=1
            break
        else:
            pass
    if count_b==0:
        count_a+=1
if a[n-1]!=a[n-2]:
    count_a+=1
print(count_a)
A1 = [int(x) for x in input().split()]
p = [int(x) for x in input().split()]
N = A1[0]
i_list=[]
for i in range(N):
  for j in range(N):
    if i!=j and p[i] % p[j]==0:
      i_list.append(p[i])
      break
check = set(p) & set(i_list)
print(N-int(len(list(check))))
import sys
input = sys.stdin.readline

n = int(input())
a = [int(x) for x in input().split()]
maxval = 10 ** 6
factor_cnt = [0] * (maxval+1)
factor_cnt[0] = 2
factor_cnt[1] = 2
for i in range(n):
    if factor_cnt[a[i]] > 1:
        continue
    for k in range(a[i], maxval+1, a[i]):
        factor_cnt[k] += 1

result = sum(factor_cnt[v] <= 1 for v in a)
print(result)
N=int(input())
A=sorted(list(map(int,input().split())))
dp=[True]*N
if len(set(A))==1:
    print(0)
    exit()
for i in range(N-1):
    if dp[i]:
        for j in range(i+1,N):
            if A[j]%A[i]==0:
                dp[j]=False
print(dp.count(True))
import collections
N = int(input())
A = list(map(int, input().split()))
A.sort()
B = set()
M = A[-1]
c = 0
X = collections.Counter(A)
for i, j in X.items():
    if j != 1:
        B.add(i)
for a in A:
    Z = True
    for b in B:
        if a % b == 0:
            Z = False
            break
    if Z:
        c += 1
        if a <= 10 ** 3:
            B.add(a)
print(c)
n=int(input())
a=list(map(int, input().split()))
ans=0
cnt=[0]*((10**6)+1)
a.sort()
b=[]
for i in a:
    cnt[i]+=1
for i in range(10**6+1):
    if cnt[i] ==1:
        b.append(i)
cnt=[0]*((10**6)+1)
for s in b:
    for i in range(s*2,10**6+1,s):
        cnt[i]=1
for s in b:
    if cnt[s]==0:
        ans+=1
print(ans)
N = int(input())
data = [int(i) for i in input().split(" ")]
res = 0

for i in range(N):
    for j in range(N):
        if i != j :
            if data[j] % data[i] == 0:
                res = res + 1

print(res)
import collections
N = int(input())
A = list(map(int, input().split()))
A.sort()
collect = collections.Counter(A)
count = 0
if N == 1:
    print(0)
    exit()
for i in range(N):
    judge = True
    if i == 0:
        if collect[A[i]] == 1:
            count += 1
        continue
    if  collect[A[i]] > 1:
        continue
    for j in range(i):
        if A[i] % A[j] == 0:
            judge = False
            break
    if judge:
        count += 1
print(count)
n = int(input())
numlist = list(map(int,input().split()))

counter = 0
for num in numlist:
    Flag = True
    for i in numlist:
        if i == num:
            continue
        if i%num != 0:
            Flag = False
            break
    if Flag:
        counter += 1

if len(set(numlist)) == 1:
    print(0)
else:
    print(counter)
from bisect import bisect
n=int(input())
a=sorted(list(map(int,input().split())))
y=set(a)
acc=0
dp=[True]*(a[-1]+1)
for i in range(2,a[-1]+1):
  if i in y:
    if dp[i]==True:
      idx=bisect(a,i)
      if a[idx-1]==a[idx-2]:
        dp[i]==False
      else:acc+=1
    dp[2*i::i]=[False]*len(dp[2*i::i])
print(acc)
n = int(input())
a = list(map(int, input().split()))
a.sort()
s = []
for i in range(n):
    if i > 0 and a[i] == a[i-1]: continue
    if i < (n-1) and a[i] == a[i+1]: continue
    s.append(a[i])

if not s: print(0); exit()

m = max(s)
d = [False] * (m+1)
ans = 0
for x in s:
    if not d[x]: ans += 1
    for i in range(x, m+1, x):
        d[i] = True
    
print(ans)
n = int(input())
A = tuple(map(int, input().split()))
A = sorted(A, reverse=True)

c = 0
for i in range(n-1):
    for j in range(i+1, n):
        if A[i] % A[j] == 0:
            break
    else:
        c += 1
if A[n-1]%A[n-2] != 0:
    c += 1
print(c)
from collections import Counter

input()
a_list = list(map(int, input().split()))

c = Counter(a_list)
divisible = [True] * (10**6+1)
for el, count in c.items():
    if count!=1:
        divisible[el] = False
        continue
    else:
        for i in range(el*2, 10**6+1, el):
            divisible[i] = False
a_list = list(set(a_list))
ans = len(
    [1 for a in a_list if divisible[a]]
)    
print(ans)
N=int(input())
#5
A=sorted(map(int,input().split()))
#24 11 8 3 16

dp = [1]*max(A)
l = len(dp)

for a in A:
	if dp[a-1] == 1:
		dp[a-1] = 2
		for i in range(2*a, l+1, a):
			dp[i-1] = 0
	elif dp[a-1] == 2:
		dp[a-1] = 0

sum([1 for a in A if dp[a-1] != 0])
from collections import Counter
n=int(input())
a=sorted(list(map(int,input().split())))
 
c=[1 for i in range(10**6+1)]
d = Counter(a)
s = list(set(a))
count = 0
if d[1] == 1:
  print(1)
elif d[1] >=2:
  print(0)
for x in s:
  t = x * 2
  while t <= 10 ** 6:
    c[t] = 0
    t += x

for x in a:
  if d[x] == 1 and c[x] == 1:
    count += 1
print(count)
import numpy as np

N = int(input())
a_list = list(map(int, input().split()))

num_array = np.zeros(int(2e6+1), dtype=np.int8)
for a in a_list:
    num_array[a::a] += 1

count = 0
for a in a_list:
  if num_array[a] == 1:
    count += 1
print(count)
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
count = 0
for i in range(N):
    for j in range(i, N):
        if i != j and A[i] % A[j] == 0:
            break
        if j == N-1:
            count += 1
    if i == N-1 and A[N-1] in A[:N-1]:
        count -= 1
print(count)
N = int(input())
A = list(map(int,input().split()))

ans = 0
for i in range(N):
    for j in range(i+1, N):
        if A[i]%A[j] == 0:
            break
        if j == N-1:
            ans += 1

print(ans)
# Not Divisible

N = int(input())
A = [int(n) for n in input().split()]

ok = []
A.sort()

while 0 < len(A):
    a0 = A[0]
    if a0 in A[1:]:
        A = list(filter(lambda n: n != a0, A))
        continue
    A = list(filter(lambda n: n % a0 != 0, A))
    ok.append(a0)

print(len(ok))
N=int(input())
A = list(map(int, input().split()))

m=max(A)
ans_list=A

counter=0

for i in range(1,m+1):
    if i in A:
        ans_list=list(filter(lambda x:x%i!=0 or x==i,ans_list))
        tmp=ans_list
        ans_list=set(ans_list)
        if len(ans_list)!=len(tmp):
            counter+=1

        # print(ans_list)

print(len(ans_list)-counter)
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

n = I()
l = LI()
list.sort(l, reverse=True)
c = 0
for a in range(n-1):
  for b in l[a+1:]:
    if l[a] % b == 0:
      break
  else:
    c += 1
  
print(c)
N = int(input())
A = [int(i) for i in input().split()]
A.sort()

ans = 0
for i in range(N):
    if i == 0:
        if N != 1 and A[0] != A[1]:
            ans += 1
    else:
        if all(A[i] % A[i - j] != 0 for j in range(1, i + 1)):
            print(A[i])
            ans += 1
print(ans)
N=int(input())
A=list(map(int,input().split()))
A=sorted(A, reverse=True)
numCount=0
for i in range(len(A)-1):
    count=0
    for j in range(i+1,len(A)):
        if A[i]%A[j]==0:
            break
        if j==len(A)-1:
            numCount+=1
if N>1:
    if A[len(A)-1]%A[len(A)-2]!=0:
        numCount+=1
print(numCount)
import bisect
N=int(input())
A=list(sorted(set(list(map(int,input().split())))))
ans=0
N=len(A)
for i in range(N):
    B=A.copy()
    t=B[i]
    j=max(bisect.bisect_left(B,t*0.5),i)
#     print(t,j)
    del B[j:]
    arr=[]
#     print(B)
    if N>1:
        if all(list(map(lambda x: t%x!=0, B))):
            ans+=1
#             print(i)
print(ans)
import numpy as np
N=int(input())
alist=list(map(int, input().split()))

alist.sort()
#print(alist)
ans=0
for i in range(1,N):
    a=alist[i]
    aaa=[a]*i
    x=np.array(aaa)
    y=np.array(alist[0:i])
    amari=x%y
    if list(amari).count(0)==1:
        ans+=1
print(ans)
import sys
from collections import Counter
def input(): return sys.stdin.readline().rstrip()

def main():
    N = int(input())
    A = sorted(map(int, input().split()))
    MAX_A = max(A)
    A_COUNT = Counter(A)

    ans = 0
    prime = [False] * 2 + [True] * (MAX_A - 1)
    for a in A:
        if prime[a]:
            if A_COUNT[a] == 1:
                ans += 1
            for j in range(a, MAX_A + 1, a):
                prime[j] = False
    print(ans)

if __name__ == '__main__':
    main()
def sieve(n, A):
    data = A
    prime = []
    while True:
        if len(data) == 0:
            return prime
        p = data[0]
        prime.append(p)
        data = [e for e in data if e % p != 0]


N = int(input())
A = list(map(int, input().split()))

if 1 in A:
    print(0)
    exit()

if all(a == A[0] for a in A):
    print(0)
    exit()

n = max(A)
A.sort()
print(len(sieve(n, A)))
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
count = 0
for i in range(N):
    for j in range(N-1, i-1, -1):
        if i != j and A[i] % A[j] == 0:
            break
        if j == i:
            count += 1
    if i == N-1 and A[N-1] in A[:N-1]:
        count -= 1
print(count)
N=int(input())
L=list(map(int,input().split()))
a=0
b=N
if 1 in L:
  print(0)
else:
  for i in L:
    for j in L:
      if i!=j and i%j==0:
        a+=1
        if a>=1:
          b=b-1
  print(b)
import numpy as np

N = int(input())

x = np.array(np.int64(input().split()))
print(x)

def hantei_5(length, list_1):
    list_2 = np.array([True for i in np.arange(N) if np.count_nonzero(
        list_1[i] % list_1 == 0) == 1])
    #print(list_2)
    count = np.count_nonzero(list_2)
    return count

print(hantei_5(N,x))
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()
a = li()

a.sort()
a.append(1000000007)

dim = []
dim.append(a[0])

ans = 0
if a[0] != a[1]:
    ans += 1

for i in range(1,len(a)-1):
    for j in dim:
        if a[i] % j == 0:
            break
    else:
        if a[i] % a[i+1] != 0:
            dim.append(a[i])
            ans += 1
            # print('out',dim)

print(ans)
import sys

import numpy as np

readline = sys.stdin.buffer.readline


def solver(A):
    c = 0
    A = np.array(A)
    while True:
        if len(A) == 0:
            break
        a = A[0]
        A = A[A % a != 0]
        c += 1
    return c


def main():
    N = int(readline())
    A = list(map(int, readline().split()))
    A = list(set(A))

    if len(set(A)) == 1:
        print(0)
    else:
        c = solver(A)
        print(c)

main()
n=int(input())
a=list(map(int, input().split()))

a.sort(reverse=True)
print(a)
ans=n
for i in range(n):
    if i==n-1:
        if a[i]==a[i-1]:
            ans-=1
    for j in range(i+1,n):
        if a[i]%a[j]==0:
            ans-=1
            break
print(ans)
n = int(input())
a = [int(i) for i in input().split()]
a.sort()

ma = 2 * 10 ** 6
tab = [False] * (ma)

ans = 0
j = 0
for i in a:
    if not tab[i]:
        if not(n - 1 > j and a[j] == a[j+1]):
            ans += 1
        for j in range(i, ma, i):
            tab[j] = True
    j += 1
print(ans)
N = int(input())
listA = list(map(int, input().split()))

res = 0
count = 0
dividelist = listA
for i, Ai in enumerate(listA[:]):
    for j, Aj in enumerate(dividelist):
        if i == j+count:
            continue
        if Ai % Aj == 0:
            res += 1
            count += 1
            dividelist.remove(Ai)
            break

print(N - res)
def D():
    n = int(input())
    a = list(map(int, input().split()))
    a = [x for x in set(a) if a.count(x) < 2]
    if len(a) == 0:
        print(0)
        return
    import copy
    res = copy.copy(a)
    for d in a:
        if d not in res:
            continue
        mult = list(range(d*2,max(res)+1,d))
        res = list(set(res)-set(mult))
    print(len(res))
D()
import sys

n = int(input())
As = list(map(int, input().split()))

As = sorted(As)

# 例外処理
if len(set(As)) == 1:
  print(0)
  sys.exit()

cnt = [True]*n
for i in range(0, n):
  for j in range(i+1, n):
    if As[j]%As[i] == 0:
      cnt[j] = False
    if As[j] == As[i]:
      cnt[i] = False

print(sum(cnt))
import sys
input = sys.stdin.readline
N = int(input())
A = [int(i) for i in input().split()]
from collections import defaultdict
dict_A = defaultdict(int)
for a in A:
  dict_A[a] += 1
A = []
for key in dict_A.keys():
  if dict_A[key] == 1:
    A.append(key)
A = sorted(A)
from collections import deque
Q = deque(A)
ans = 0
while Q:
  q = Q.popleft()
  ans += 1
  temp_Q = deque([])
  while Q:
    r = Q.popleft()
    if r%q!=0:
      temp_Q.append(r)
  Q = temp_Q
print(ans)
n=int(input())
As=list(map(int,input().split()))
As.sort()

mul=1
ans=[0]*len(As)
for i in range(len(As)-1):
    if As[i+1]==As[i]:
        ans[i+1]+=1
        ans[i]+=1
    for j in range(len(As)-1,i,-1):
        if As[j]%As[i]==0:
            ans[j]+=1
        if As[i]*mul>As[j]:
            break
    mul*=As[i]
print(ans.count(0))
n = int(input())
A = list(map(int, input().split()))

A.sort()

x = A[0]
flag = True
for a in A:
    if a % x != 0:
        flag = False
if flag:
    print(0)
    exit()

used = [False] * A[-1]
ans = 0
for idx, a in enumerate(A):
    if used[a - 1]:
        continue
    ans += 1
    for j in range(a, len(used) + 1, a):
        used[j - 1] = True
print(ans)