Buggy python submission (verdict: Runtime Error):
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000001

prev = 0

for i in range(N):
    if As[i] == prev:
        sieve[As[i]] = False
        continue
    else:
        prev = As[i]
        try:
            for j in range(2, 1000000 // prev + 1):
                sieve[prev * j] = False
        except:
            continue

count = 0
As = list(set(As))
for i in range(N):
    if sieve[As[i]] is True:
        count += 1
        
print(count)

Fixed submission:
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000001

prev = 0

for i in range(N):
    if As[i] == prev:
        sieve[As[i]] = False
        continue
    else:
        prev = As[i]
        try:
            for j in range(2, 1000000 // prev + 1):
                sieve[prev * j] = False
        except:
            continue

count = 0
As = list(set(As))
for i in range(len(As)):
    if sieve[As[i]] is True:
        count += 1
        
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000001

prev = 0

for i in range(N):
    if As[i] == prev:
        sieve[As[i]] = False
        continue
    else:
        prev = As[i]
        for j in range(2, 1000000 // prev + 1):
            sieve[prev * j] = False

count = 0
As = list(set(As))
for i in range(N):
    if sieve[As[i]] is True:
        count += 1
        
print(count)

Fixed submission:
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000001

prev = 0

for i in range(N):
    if As[i] == prev:
        sieve[As[i]] = False
        continue
    else:
        prev = As[i]
        try:
            for j in range(2, 1000000 // prev + 1):
                sieve[prev * j] = False
        except:
            continue

count = 0
As = list(set(As))
for i in range(len(As)):
    if sieve[As[i]] is True:
        count += 1
        
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000000

count = 1
prev = As[0]
for j in range(1000000 // prev + 1):
    sieve[prev * j - 1] = False


for i in range(N):
    if As[i] == prev:
        continue
    else:
        prev = As[i]
        if sieve[prev] is True:
            count += 1
        for j in range(1000000 // prev + 1):
            sieve[prev * j - 1] = False

print(count)

Fixed submission:
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000001

prev = 0

for i in range(N):
    if As[i] == prev:
        sieve[As[i]] = False
        continue
    else:
        prev = As[i]
        try:
            for j in range(2, 1000000 // prev + 1):
                sieve[prev * j] = False
        except:
            continue

count = 0
As = list(set(As))
for i in range(len(As)):
    if sieve[As[i]] is True:
        count += 1
        
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
As = sorted(list(map(int, input().split())))

if As[0] == As[1]:
  count = 0
else:
  count = 1
  
for i in range(1, N):
  count_sub = 0
  for j in range(i):
    if As[i] % As[j] == 0:
      count_sub += 1
  if count_sub == 0:
    count += 1
    
print(count)

Fixed submission:
N = int(input())
As = sorted(list(map(int, input().split())))

sieve = [True] * 1000001

prev = 0

for i in range(N):
    if As[i] == prev:
        sieve[As[i]] = False
        continue
    else:
        prev = As[i]
        try:
            for j in range(2, 1000000 // prev + 1):
                sieve[prev * j] = False
        except:
            continue

count = 0
As = list(set(As))
for i in range(len(As)):
    if sieve[As[i]] is True:
        count += 1
        
print(count)