Buggy python submission (verdict: Time Limit Exceeded):
N = 1000001
a = [0]* N
input()
b = sorted(map(int,input().split()))
for x in b:
  a[int(x)] += 1
for i in b:
  if a[i]:
    for j in range(i + i, N, i):
      a[j] = 0
print(a.count(1))


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
N = 1000001
a = [0]* N
input()
b = sorted(map(int,input().split()))
for x in b:
  a[int(x)] += 1
for i in b:
  if a[i]:
    for j in range(i + i, N, i):
      a[j] = 0
print(a.count(1))


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
 
input()
c = Counter(map(int, input().split()))
r = int(c[1] == 1)
if c[1] == 0:
  for k, v in c.items():
    if v == 1:
      i = 2
      while i * i <= k and (k % i or c[i] == c[k // i] == 0):
        i += 1
      if i * i > k:
        r += 1
print(r)


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
 
input()
c = Counter(map(int, input().split()))
r = int(c[1] == 1)
if c[1] == 0:
  for k, v in c.items():
    if v == 1:
      i = 2
      while i * i <= k and (k % i or i not in c and k // i not in c):
        i += 1
      if i * i > k:
        r += 1
print(r)


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

input()
a = list(map(int, input().split()))
s = set(a)
t = {k for k, v in Counter(a).items() if v == 1} 
r = int(1 in t)
if 1 not in s:
  for x in t:
    i = 2
    while i * i <= x and (x % i or i not in s and x // i not in s):
      i += 1
    if i * i > x:
      r += 1
print(r)


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

input()
c = Counter(map(int, input().split()))
r = int(c[1] == 1)
if c[1] == 0:
  for k, v in c.items():
    if v == 1:
      i = 2
      while i * i <= k:
        if k % i == 0 and  (i in c or k // i in c):
          break
        i += 1
      else:
        r += 1
print(r)


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

input()
c = Counter(map(int, input().split()))
r = int(c[1] == 1)
if c[1] == 0:
  for k, v in c.items():
    if v == 1:
      i = 2
      while i * i <= k:
        if k % i == 0 and  (i in c or k // i in c):
          break
        i += 1
      else:
        r += 1
print(r)


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import groupby

input()
a = []
r = 0
for k, g in groupby(sorted(map(int, input().split()))):
  for x in a:
    if k % x == 0:
      break
  else:
    a.append(k)
    if len(list(g)) == 1:
      r += 1
print(r)


Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import groupby

input()
a = []
r = 0
for k, g in groupby(sorted(map(int, input().split()))):
  try:
    next(x for x in a if k % x == 0)
  except StopIteration:
    a.append(k)
    if len(list(g)) == 1:
      r += 1
print(r)

Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import groupby

input()
a = []
r = 0
for k, g in groupby(sorted(map(int, input().split()))):
  try:
    next(x for x in a if k % x == 0)
  except StopIteration:
    a.append(k)
    if len(list(g)) == 1:
      r += 1
print(r)

Fixed submission:
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  for j in range(i + i, N, i):
    if a[i]:
      a[j] = 0
print(a.count(1))