Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

n,k,q=list(map(int,input().split()))
a=[]
for i in range(q):
  a.append(int(input()))
#p=[k for _ in range(n)]
w=q-k+1
for i in range(n):
  if a.count(i+1) >= w:
    print('Yes')
  else:
    print('No')


### FIXED CODE ###

n,k,q=list(map(int,input().split()))
a=[0 for _ in range(n)]
for i in range(q):
  x=int(input())
  a[x-1] += 1
w=q-k+1
for i in range(n):
  if a[i] >= w:
    print('Yes')
  else:
    print('No')
### BUGGY CODE ###

#! python3
# coding:utf-8
 
def main():
    n = int(input())
    for i in range(1,n+1):
        cnt=0
    
        for x in range(1,n+1):
            for y in range(1,n-x+1):
                for z in range(1,n-x-y+1):
                    eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                    
                    if eq == i:
                        cnt+=1
        print(cnt)
if __name__ == "__main__":
    main() 

### FIXED CODE ###

#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()
### BUGGY CODE ###

H,W,M = map(int, input().strip().split())

squares = []
for i in range(H):
    arr = []
    for j in range(W):
        arr.append(0)
    squares.append(arr)

for i in range(M):
    hi, wi = map(int, input().strip().split())
    squares[hi-1][wi-1] = 1

row_sums = []
for i in range(H):
    row_sums.append(sum(squares[i]))

col_sums = []
for j in range(W):
    sum = 0
    for i in range(H):
        sum += squares[i][j]
    col_sums.append(sum)

max = 0
for i in range(H):
    for j in range(W):
        total = row_sums[i] + col_sums[j]
        if squares[i][j] == 1:
            total -= 1
        if total > max:
            max = total

print(max)


### FIXED CODE ###

import sys
input = sys.stdin.readline

H,W,M=map(int,input().split())
nh=[0]*H
nw=[0]*W
boms=set()
for _ in range(M):
    h,w=map(int,input().split())
    nh[h-1] += 1
    nw[w-1] += 1
    boms.add((h-1, w-1))

maxh = max(nh)
maxw = max(nw)

i_indexes=[]
for i in range(H):
    if nh[i] == maxh:
        i_indexes.append(i)
j_indexes=[]
for j in range(W):
    if nw[j] == maxw:
        j_indexes.append(j)

for i in i_indexes:
    for j in j_indexes:
        if (i,j) in boms:
            continue
        print(maxh + maxw)
        exit()
print(maxh + maxw - 1)
### BUGGY CODE ###

# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない
#S =input().strip()
*S, = input() 
count =0
flag =1
while len(S) >=2 and flag==1:
    flag =0
    for i in range(len(S)-1):
        if S[i:i+2] ==["1","0"] or S[i:i+2] ==["0","1"]:
            #print(S[i:2])
            del S[i:i+2]
            #print(S,end=" ")
            count +=2
            #print(count)
            flag =1
print(count)

### FIXED CODE ###

#計算でもとまるのか・・・
# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない
#*S, = input() 
S =input().strip()
c1 =S.count("1")
c0 =S.count("0")
print(min(c0,c1)*2)
### BUGGY CODE ###

d=[0]*13
d[0]=1
mul=1
for c in reversed(input()):
    e=[0]*13
    """
    if c=="?":
        for i in range(10):
            for j in range(13):
                e[(i*mul+j)%13]+=d[j]
                e[(i*mul+j)%13]%=(10**9+7)
    else:
        for j in range(13):
            e[(int(c)*mul+j)%13]+=d[j]
            e[(int(c)*mul+j)%13]%=(10**9+7)
    """
    for i in (range(10) if c=="?" else[int(c)]):
        for j in range(13):
            e[(i*mul+j)%13]+=d[j]
            e[(i*mul+j)%13]%=(10**9+7)    
    d=e[:]
    mul*=10
print(d[5])




### FIXED CODE ###

# coding: utf-8
# Your code here!
 
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意
 
s = input()
l = len(s)
MOD = 10**9+7
 
dp = [0]*13
dp[0] = 1
for i in s:
    new = [0]*13
    if i == "?":
        for i in range(10):
            for j in range(13):
                new[(10*j+i)%13] += dp[j]
    else:
        i = int(i)
        for j in range(13):
            new[(i+10*j)%13] += dp[j]
    
    for i in range(13):
        new[i] %= MOD
    dp,new = new,dp
#    print(dp)
 
print(dp[5]%MOD)
### BUGGY CODE ###

import sys
input = sys.stdin.readline
import bisect

N, K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]

A_m = [abs(int(x)) for x in A if x < 0]
A_m.sort()
N_m = len(A_m)

A_p = [int(x) for x in A if x > 0]
A_p.sort()
N_p = len(A_p)

M = N_m * N_p
P = (1 / 2) * (N_m) * (N_m - 1) + (1 / 2) * (N_p) * (N_p - 1)
Z = (1 / 2) * N * (N - 1) - (M + P)

if M < K <= M + Z:
    print(0)
    sys.exit()

def cnt_M(x):
    cnt = 0
    for i in A_m:
        cnt += bisect.bisect_right(A_p, x // i)
    return cnt >= (M - K + 1)

if K <= M:
    left = -1 - 10**18
    right = 1 + 10**18 
    while right - left > 1:
        mid = (left + right) // 2
        if cnt_M(mid):
            right = mid
        else:
            left = mid
    print(-right)
    sys.exit()
K -= (M + Z)
def cnt_P(x):
    cnt = 0
    ng = 0
    for i in A_m:
        cnt += bisect.bisect_right(A_m, x // i)
        if i ** 2 <= x:
            ng += 1
    for j in A_p:
        cnt += bisect.bisect_right(A_p, x // j)
        if j ** 2 <= x:
            ng += 1
    return (cnt - ng) // 2 >= K

left = -1 - 10**18
right = 1 + 10**18
while right - left > 1:
    mid = (left + right) // 2
    if cnt_P(mid):
       right = mid
    else:
        left = mid

print(right)


### FIXED CODE ###

import sys
input = sys.stdin.readline
import numpy as np

N, K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]

A_m = np.array(sorted([abs(int(x)) for x in A if x < 0]), np.int64)
N_m = len(A_m)

A_p = np.array(sorted([int(x) for x in A if x > 0]), np.int64)
N_p = len(A_p)

M = N_m * N_p
P = (1 / 2) * (N_m) * (N_m - 1) + (1 / 2) * (N_p) * (N_p - 1)
Z = (1 / 2) * N * (N - 1) - (M + P)

if M < K <= M + Z:
    print(0)
    sys.exit()

def cnt_M(x):
    cnt = np.searchsorted(A_m, x // A_p, side="right").sum()
    return cnt >= M - K + 1

if K <= M:
    left = -1 -10 ** 18
    right = 1 + 10 ** 18
    while right - left> 1:
        mid = (left + right) // 2
        if cnt_M(mid):
            right = mid
        else:
            left = mid
 
    print(-right)
    sys.exit()

K -= (M + Z)
def cnt_P(x):
    cnt = 0
    ng = 0
    cnt += np.searchsorted(A_m, x // A_m, side="right").sum()
    cnt += np.searchsorted(A_p, x // A_p, side="right").sum()
    ng = np.count_nonzero(A_m * A_m <= x) + np.count_nonzero(A_p * A_p <= x)
    cnt = (cnt - ng) // 2
    return cnt >= K

left = -1 - 10 ** 18
right = 1 + 10 ** 18

while right - left > 1:
    mid = (left + right) // 2
    if cnt_P(mid):
        right = mid
    else:
        left = mid
print(right)
### BUGGY CODE ###

import itertools

_ = input()
A = list(map(int, input().split()))
mod = 10**9 + 7

print(sum([(ai * aj) % mod for ai, aj in itertools.combinations(A, 2)]) % mod)


### FIXED CODE ###

_ = input()
A = list(map(int, input().split()))
mod = 10**9 + 7

s = 0
a = 0
for _a in A:
  s += _a * a
  a = (a + _a) % mod
print(s % mod)
### BUGGY CODE ###

import sys
input = sys.stdin.readline
check=dict()
N,b,d=0,[],0
#ttfは235、chaはabc
def dfs_sub(n,ttf,cha):
    global check,d

    if 0 in check:
        check[0]=min(check[n]+n*d,check[0])
    else:
        check[0]=check[n]+n*d

    x1,x2=n//ttf,n%ttf
    if ttf-x2>=x2:
        if x1==0:
            if x1 in check:
                if check[x1]>check[n]+x2*d:
                    check[x1]=check[n]+x2*d
            else:
                check[x1]=check[n]+x2*d
        else:
            if x1 in check:
                if check[x1]>check[n]+x2*d+cha:
                    check[x1]=check[n]+x2*d+cha
                    dfs(x1)
            else:
                check[x1]=check[n]+x2*d+cha
                dfs(x1)

    x1,x2=n//ttf+1,ttf-n%ttf
    if ttf-x2>=x2:
        if x1 in check:
            if check[x1]>check[n]+x2*d+cha:
                check[x1]=check[n]+x2*d+cha
                dfs(x1)
        else:
            check[x1]=check[n]+x2*d+cha
            dfs(x1)


def dfs(n):
    global b,check,d
    for i,j in zip([2,3,5],b):
        dfs_sub(n,i,j)

t=int(input())
for i in range(t):
    N,*b,d=map(int,input().split())
    check={N:0}
    dfs(N)
    print(check[0])

### FIXED CODE ###

import sys
check=dict()
N,a,b,c,d=0,0,0,0,0
#ttfは235、chaはabc
def dfs_sub(n,ttf,cha):
    global check,d
    if 0 in check:
        check[0]=min(check[n]+n*d,check[0])
    else:
        check[0]=check[n]+n*d
    if n//ttf==0:
        if n//ttf in check:
            if check[n//ttf]>check[n]+(n%ttf)*d:
                check[n//ttf]=check[n]+(n%ttf)*d
        else:
            check[n//ttf]=check[n]+(n%ttf)*d
    else:
        if n//ttf in check:
            if check[n//ttf]>check[n]+(n%ttf)*d+cha:
                check[n//ttf]=check[n]+(n%ttf)*d+cha
                dfs(n//ttf)
        else:
            check[n//ttf]=check[n]+(n%ttf)*d+cha
            dfs(n//ttf)
    if 1+n//ttf in check:
        if check[1+n//ttf]>check[n]+(ttf-n%ttf)*d+cha:
            check[1+n//ttf]=check[n]+(ttf-n%ttf)*d+cha
            dfs(1+n//ttf)
    else:
        check[1+n//ttf]=check[n]+(ttf-n%ttf)*d+cha
        dfs(1+n//ttf)


def dfs(n):
    global check,a,b,c,d
    dfs_sub(n,2,a)
    dfs_sub(n,3,b)
    dfs_sub(n,5,c)

t=int(input())
ans=[0]*t
for i in range(t):
    N,a,b,c,d=map(int,input().split())
    check={N:0}
    dfs(N)
    ans[i]=check[0]
for i in range(t):
    print(ans[i])
### BUGGY CODE ###

x=input()
x=int(x)
while True:
  for i in range(2, int(x/2)):
    if x%i==0:
      x+=1
      break
    else:
      print(x)

### FIXED CODE ###

def waru(x):
  for i in range(2, x):
    if x%i==0:
      return 1
    if i==x-1:
      return 2
x=input()
x=int(x)
while True:
  if waru(x)==1:
    x+=1
  else:
    print(x)
    break
### BUGGY CODE ###

N, K = map(int, input().split())
h = sorted([int(input()) for i in range(N)])
min_max = lambda x: max(x) - min(x)
print(min([min_max(h[i:i+K]) for i in range(N-K+1)]))




### FIXED CODE ###

N, K = map(int, input().split())
h = sorted([int(input()) for i in range(N)])
print(min([h[i+K-1] - h[i] for i in range(N-K+1)]))
### BUGGY CODE ###

N = int(input())
S = input()
St = []
for i in range(N):
  St += [ord(S[i])-97]
  
#初期化
dp=[[0 for i in range(N+1)] for j in range(N+1)]

ans = 0
#DP:dp[i][j] Sのi文字目以降とj文字目以降の最大マッチング
for i in range(N-1,-1,-1):
  for j in range(N-1, i-1, -1):
    if (S[i] == S[j]): 
      dp[i][j] = max(dp[i][j], dp[i+1][j+1] + 1);
      ans = max(ans, min(dp[i][j], j-i));
      
print(ans)

### FIXED CODE ###

N = int(input())
S = input()
from collections import deque

def is_ok(l):
    hs = set()
    q = deque()
    for i in range(N-l+1):
        h = S[i:i+l]
        if h in hs:
            return True
        q.append(h)
        if len(q) >= l:
            hs.add(q.popleft())
    return False

ok = 0
ng = N//2+1
while ng-ok > 1:
    m = (ng+ok)//2
    if is_ok(m):
        ok = m
    else:
        ng = m
print(ok)
### BUGGY CODE ###

def main():
  n=int(input())
  lst=[int(input()) for i in range(5)]
  l=[0]*5
  l.insert(0,n)
  ans=0
  while l[5]!=n:
    for i in range(5,0,-1):
      if l[i-1]!=0:
        res=min(l[i-1],lst[i-1])
        l[i]+=res
        l[i-1]-=res
    ans+=1
  print(ans)
if __name__=='__main__':
  main()

### FIXED CODE ###

n=int(input())
lst=[int(input()) for i in range(5)]
m=min(lst)
import math
print(math.ceil(n/m)+4)
### BUGGY CODE ###

S = input()
Q = int(input())

ans = S
flag = 1
for i in range(Q):
    qry = list(input().split())

    if qry[0] == '1' and flag:
        flag = 0
    elif qry[0] == '1' and not flag:
        flag = 1

    elif qry[0] == '2' and flag:
        if qry[1] == '1':
            ans = qry[2] + ans
        elif qry[1] == '2':
            ans += qry[2]
    elif qry[0] == '2' and not flag:
        if qry[1] == '1':
            ans += qry[2]
        elif qry[1] == '2':
            ans = qry[2] + ans

if flag:
    print(ans)
else:
    print(ans[::-1])

### FIXED CODE ###

from collections import deque

S = deque(input())
Q = int(input())

flag = 1
for i in range(Q):
    qry = input().split()

    if qry[0] == '1':
        if flag:
            flag = 0
        else:
            flag = 1
    
    elif qry[0] == '2':
        if flag:
            if qry[1] == '1':
                S.appendleft(qry[2])
            else:
                S.append(qry[2])
        else:
            if qry[1] == '1':
                S.append(qry[2])
            else:
                S.appendleft(qry[2])

S = ''.join(S)

if flag:
    print(S)
else:
    print(S[::-1])
### BUGGY CODE ###

# coding: utf-8
bodies_count = list(map(int,input().split()))
enemy_life = list(map(int,input().split()))
count = 0

if bodies_count[1] == 0:
    print(sum(enemy_life))
else:
    for i in range(bodies_count[1]):
        if enemy_life == []:
            print(count)
            break
        else:
            enemy_life.pop(enemy_life.index(max(enemy_life)))

    if enemy_life != []:
        total_life = sum(enemy_life)
        while total_life > 0:
            total_life -= 1
            count += 1
        print(count)


### FIXED CODE ###

# coding: utf-8
bodies_count = list(map(int,input().split()))
enemy_life = list(map(int,input().split()))

if bodies_count[1] == 0:
    print(sum(enemy_life))
else:
    enemy_life.sort(reverse=True)
    if bodies_count[1] == 1:
        del enemy_life[0] 
    else:
        a = bodies_count[1]
        del enemy_life[0:a]

    if enemy_life != []:
        print(sum(enemy_life))
    else:
        print(0)
    # for i in range(bodies_count[1]):
    #     if enemy_life == []:
    #         print(count)
    #         break
    #     else:
    #         enemy_life.sort()
    #         print(enemy_life)
    #         enemy_life.pop(enemy_life.index(max(enemy_life)))
### BUGGY CODE ###

N = int(input())
X = [int(i) for i in input().split()]
for i in range(N):
    x = [int(X[j]) for j in range(N) if i != j]
    x.sort()
    print(x[(N - 1) // 2])


### FIXED CODE ###

N = int(input())
X = [int(i) for i in input().split()]
x = sorted(X)
n = N // 2
for i in range(N):
    if X[i] < x[n]:
        print(x[n])
    else:
        print(x[n - 1])
### BUGGY CODE ###

a,b,n = map(int, input().split())
ans = 0
for x in range(n,n//4,-1):
    ans = max(int(a*x/b) - (a*int(x/b)),ans)
print(ans)

### FIXED CODE ###

a, b, n = map(int,input().split())
x = min(n,b-1)
print(int(a*(x%b) / b))
### BUGGY CODE ###

N = int(input())
A = list(map(int,input().split()))
S = 1
for i in range(N):
    S *= A[i]
if S > 10 ** 18:
    print("-1")
else:
    print(S)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
S = 1
if 0 in A:
    print("0")
    exit()
    
for i in range(N):
    S *= A[i]
    if S > 1000000000000000000:
        print("-1")
        exit()

print(S)
### BUGGY CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd


def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    a, b, c, d = MAP()

    ct = 0
    for i in range(a, b + 1):
        if i % c!= 0 and i%d!=0:
            ct += 1
    print(ct)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd


def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    a, b, c, d = MAP()

    l = c * d // gcd(c, d)
    a -= 1

    kukan1 = b - b // c - b // d + b // l
    kukan2 = a - a // c - a // d + a // l

    print(kukan1 - kukan2)


if __name__ == '__main__':
    main()
### BUGGY CODE ###

N = int(input())
P = list(map(float, input().split()))

dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
    tmp = dp
    dp = [0] * (N + 1)
    for j in range(N):
        if j < N:
            dp[j + 1] += tmp[j] * P[i - 1]
        dp[j] += tmp[j] * (1 - P[i - 1])

num = 0
for i in range(N // 2 + 1, N + 1):
    num += dp[i]

print(num)


### FIXED CODE ###

N = int(input())
P = list(map(float, input().split()))
dp = [[0] * (N + 1) for i in range(N + 1)]
dp[0][0] = 1.0
for i in range(1, N + 1):
    for j in range(N):
        if j < N:
            dp[i][j + 1] += dp[i - 1][j] * P[i - 1]
        dp[i][j] += dp[i - 1][j] * (1 - P[i - 1])

num = 0
for i in range(N + 1):
    if i > N // 2:
        num += dp[N][i]

print(num)
### BUGGY CODE ###

n, k = map(int, input().split())
data = list(map(int, input().split()))

for i in range(n-k):
    if data[i:i+k][0] < data[i+1:i+k+1][-1]:
        print("Yes")
        # print( data[i:i+k] )
        # print( data[i+1:i+k+1] )
    else:
        print("No")


### FIXED CODE ###

n, k = map(int, input().split())
data = list(map(int, input().split()))

for i in range(n-k):
    # if data[i:i+k][0] < data[i+1:i+k+1][-1]:
    # print("-----------------")
    # print( data[i:i+k] )
    # print( data[i+1:i+k+1] )

    # print( data[i] )
    # print( data[k+i] )
    # print("-----------------")

    if data[i] < data[k+i]:
        print("Yes")
        # print( data[i:i+k] )
        # print( data[i+1:i+k+1] )
    else:
        print("No")
### BUGGY CODE ###

R,G,B,N = map(int,input().split())
ans = 0
for r in range(N+1):
    if r*R > N: break
    for g in range(N+1):
        if r*R + g*G > N: break
        rem = N - r*R - g*G
        if rem%B == 0:
            ans += 1
print(ans)

### FIXED CODE ###

R,G,B,N = map(int,input().split())
ans = 0
for a in range(0,N+1,R):
    for b in range(0,N+1,G):
        if a+b > N: break
        c = N - a - b
        if c%B==0:
            ans += 1
print(ans)
### BUGGY CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
F = list(map(int, input().split()))
F.sort()
F = F[::-1]

def check(x, a=A, f=F, k=K):
  S = sum([max(ai - x//fi, 0) for ai, fi in zip(a, f)])
  if S > k:
    result = False
  else:
    result = True
  
  return result


l, r = 0, 10**12
m = (l + r) // 2

while True:
  result = check(m)
  if result:
    r = m
  else:
    l = m
  
  m = (l + r) // 2
  if r == l + 1:
    if check(l):
      x = l
    else:
      x = r
    break

print(x)

### FIXED CODE ###

import numpy as np

N, K = map(int, input().split())
A = np.sort(list(map(int, input().split())))
F = np.sort(list(map(int, input().split())))[::-1]

l, r = 0, 10**12
m = (l + r) // 2

while True:
  if np.maximum(A - m//F, 0).sum() <= K:
    r = m
  else:
    l = m
  
  m = (l + r) // 2
  if r == l + 1:
    if np.maximum(A - l//F, 0).sum() <= K:
      x = l
    else:
      x = r
    break

print(x)
### BUGGY CODE ###

import copy
n = int(input())
c = [n, 0, 0, 0, 0]
a = []
for i in range(5):
  a.append(int(input()))
cnt = 0
sub = [0] * 5
add = [0] * 5
add_n =[0] * 6
while True:
  for i in range(5):
    c[i] = c[i] + add[i] - sub[i]
    if c[i] > a[i]:
      sub[i] = a[i]
      add_n[i+1] = a[i]
    else:
      sub[i] = c[i]
      add_n[i+1] = c[i]
  add = copy.copy(add_n)
  cnt += 1
  if sum(c) == 0:
    print(cnt-1)
    break

### FIXED CODE ###

n = int(input())
a = []
for i in range(5):
  a.append(int(input()))
neck = min(a)
if n % neck == 0:
  print(int(n/neck) + 4)
else:
  print(int(n / neck) + 5)
### BUGGY CODE ###

#170D
def main():
    import sys, random
    from collections import Counter
    N = int(sys.stdin.readline())
    A = list(map(int, sys.stdin.readline().split()))
    #print(random.randint(1, 10**6))
    #A = [random.randint(1, 10**6) for _ in range(2*(10**3))]
    B = Counter(A)
    #print(B)
    A = list(set(A))
    A.sort()
    #print(A)
    def era(A):
        for i in range(len(A)):
            for j in range(len(A)-1, i, -1):
                if A[j] % A[i] ==0:
                    A.pop(j)
    
    era(A)
    #print(A)

    
    for i in range(len(A)-1, -1, -1):
        if B[A[i]]>=2:
            A.pop(i)
    #print(dp)
    print(len(A))
    


if __name__=='__main__':
    main()

### FIXED CODE ###

#170D
def main():
    import sys
    from collections import Counter
    import random
    N = int(sys.stdin.readline())
    A = list(map(int, sys.stdin.readline().split()))
    #A = [random.randint(1, 10**6+1) for _ in range(2*(10**5))]
    judge = [0 for _ in range(10**6+1)]
    A.sort()
    B = Counter(A)
    for a in A:
        judge[a] =1
    for a in A:
        if judge[a] ==1:
            if B[a] >=2:
                judge[a] = 0
            for i in range(2*a, 10**6+1, a):
                judge[i] = 0
                
    print(judge.count(1))

if __name__=='__main__':
    main()
### BUGGY CODE ###

n = int(input())
a = list(map(int, input().split()))
ord = [i+1 for i in range(len(a))]
ans = []
for i in ord:
    ans.append(a.index(i)+1)
print(*ans)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ord = [0 for i in range(len(a))]
count = 1
for i in a:
    ord[i-1] = count
    count += 1
print(*ord)