Buggy python submission (verdict: Runtime Error):
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*MAX
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis2 = [0]*MAX
# lis.sort()
# m = max(lis)
ans = 0
for num in lis:
    lis2[num] += 1

for num in lis:
    for i in range(num*2, MAX, num):
        if lis2[i] > 0:
            lis2[i] += 1

print(len([i for i in lis if lis2[i] == 1]))

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
MAX = int(2e5)+2


n = int(input())
lis = list(map(int,input().split()))
lis2 = [0]*MAX
# lis.sort()
# m = max(lis)
ans = 0
for num in lis:
    lis2[num] += 1

for num in lis:
    for i in range(num*2, MAX, num):
        if lis2[i] > 0:
            lis2[i] += 1

print(len([i for i in lis if lis2[i] == 1]))

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
MAX = int(2e5)+1


n = int(input())
lis = list(map(int,input().split()))
lis2 = [0]*MAX
# lis.sort()
# m = max(lis)
ans = 0
for num in lis:
    lis2[num] += 1

for num in lis:
    for i in range(num*2, MAX, num):
        if lis2[i] > 0:
            lis2[i] += 1

print(len([i for i in lis if lis2[i] == 1]))

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
MAX = int(2e5)+1


n = int(input())
lis = list(map(int,input().split()))
lis2 = [0]*MAX
# lis.sort()
# m = max(lis)
ans = 0
for num in lis:
    lis2[num] += 1

for num in lis:
    for i in range(num*2, MAX+1, num):
        if lis2[i] > 0:
            lis2[i] += 1

print(len([i for i in lis if lis2[i] == 1]))

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
MAX = int(2e5)


n = int(input())
lis = list(map(int,input().split()))
lis2 = [0]*MAX
# lis.sort()
# m = max(lis)
ans = 0
for num in lis:
    lis2[num] += 1

for num in lis:
    for i in range(num*2, MAX, num):
        if lis2[i] > 0:
            lis2[i] += 1

print(len([i for i in lis if lis2[i] == 1]))

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lis = list(map(int,input().split()))
lis2 = [True]*n
lis.sort()
m = max(lis)
ans = 0
for i in range(n):
    if lis2[i]:
        if i < n-1:
            # print(i)
            if lis[i] != lis[i+1]:
                ans += 1
        else:
            ans += 1
        for j in range(i+1,n):
            if lis2[j]:
                if lis[j]%lis[i] == 0:
                    lis2[j] = False

print(ans)

Fixed submission:
# MAX = int(1e6)+2


n = int(input())
lis = list(map(int,input().split()))
lis.sort()
MAX = lis[-1]
lis2 = [0]*(MAX+1)
# lis.sort()
# m = max(lis)
ans = 0

for num in lis:
    for i in range(num, MAX+1, num):
            lis2[i] += 1

for j in set(lis):
    if lis2[j] == 1:
        ans += 1
print(ans)