Buggy python submission (verdict: Runtime Error):
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if List[i] == List[i+1]:
      res += -1
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Runtime Error):
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in List:
  if Flag[i] ==1:
    res +=1
    for j in range(i,K,i):
      Flag[j] = 0
    if i == List[List.index(i)+1]:
      res += -1
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in List:
  if Flag[i] ==1:
    res +=1
    for j in range(i,K,i):
      Flag[j] = 0
    if List.count(i) > 1:
      res += -1
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in List:
  if Flag[i] ==1:
    res +=1
    for j in range(i,K,i):
      Flag[j] = 0
    if List.count(i) > 1:
      res += -1
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
K = New_List[N-1]+1
Flag = [1]*K
for i in New_List:
  if Flag[i] ==1:
    res +=1
    for j in range(i,K,i):
      Flag[j] = 0
    if New_List.count(i) > 1:
      res += -1
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*1000001

for i in New_List:
  if Flag[i] ==1:
    res +=1
    for j in range(i,1000001,i):
      Flag[j] = 0
    if New_List.count(i) > 1:
      res += -1
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[j] % New_List[i] ==0:
          Flag[j] = 0
  if New_List[i] > New_List[N-1]/2:
    break
for i in range(N-1):
  for j in range(i+1,N):
    if New_List[j] == New_List[i]:
      Flag[j] = 0
      Flag[i] = 0
res = Flag.count(1)
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[i] == New_List[j]:
          Flag[i] = 0
          Flag[j] = 0
        elif New_List[j] % New_List[i] ==0:
          Flag[j] = 0
        else:
          pass
      elif Flag[j] ==0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Runtime Error):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[i] == New_List[j]:
          Flag[i] = 0
          Flag[j] = 0
        elif New_List[j] % New_List[i] ==0:
          Flag[j] = 0
        else:
          pass
      elif Flag[j] ==0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[i] == New_List[j]:
          Flag[i] = 0
          Flag[j] = 0
        elif New_List[j] % New_List[i] ==0:
          Flag[j] = 0
        else:
          pass
      elif Flag[j] ==0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)


Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(1,N):
  if Flag[i] ==1:
    for j in range(i):
      if New_List[i] == New_List[j]:
        Flag[i] = 0
        Flag[j] = 0
      if Flag[j] == 1:
        if New_List[i] % New_List[j] == 0:
          Flag[i] = 0
        else:
          pass
      elif Flag[j] == 0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[i] == New_List[j]:
          Flag[i] = 0
          Flag[j] = 0
        elif New_List[j] % New_List[i] ==0:
          Flag[j] = 0
        else:
          pass
      elif Flag[j] ==0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if New_List[i] == New_List[j]:
        Flag[i] = 0
        Flag[j] = 0
      elif New_List[j] % New_List[i] ==0:
        Flag[j] = 0
      else:
        pass
  else:
    pass
res = Flag.count(1)
print(res)

Fixed submission:
N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)