n = int(input())

a = []

for i in range(n):

    a.append(int(input()))



nprimes = 0

a = sorted(a)

while True:

    for d in range(2,10001):

        if d**2>a[0]:

            nprimes+=1

            del a[0]

            break

        elif a[0]%d==0:

            del a[0]

            break

    if len(a) <= 0:

        break



print(nprimes)
def prime(num):

    if num == 0:

        return False

    elif num == 1:

        return False

    elif num == 2:

        return True

    i = 2

    while True:

        if i**2 > num:

            break

        if num%i==0:

            return False

        i += 1

    return True

n = int(input())



nums = []

for _ in range(n):

    a = int(input())

    nums.append(a)



ret = 0

for num in nums:

    if prime(num):

        ret += 1

print(ret)
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
nprimes = 0
a = sorted(a)
while True:
    for d in range(2, 10001):
        if d**2 > a[0]:
            nprimes += 1
            del a[0]
            break
        elif a[0] % d == 0:
            del a[0]
            break
    if len(a) <= 0:
        break
print(nprimes)

def prime(num):
    if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
    i = 2
    while True:
        if i**2 > num:
            break
        if num % i == 0:
            return False
        i += 1
    return True


n = int(input())
nums = []
for _ in range(n):
    a = int(input())
    nums.append(a)
ret = 0
for num in nums:
    if prime(num):
        ret += 1
print(ret)

+def prime(num): +    if num == 0: +        return False +    elif num == 1: +        return False +    elif num == 2: +        return True +    i = 2 +    while True: +        if i**2 > num: +            break +        if num % i == 0: +            return False +        i += 1 +    return True + + -a = [] -for i in range(n): -    a.append(int(input())) -nprimes = 0 -a = sorted(a) -while True: -    for d in range(2, 10001): -        if d**2 > a[0]: -            nprimes += 1 -            del a[0] -            break -        elif a[0] % d == 0: -            del a[0] -            break -    if len(a) <= 0: -        break -print(nprimes) +nums = [] +for _ in range(n): +    a = int(input()) +    nums.append(a) +ret = 0 +for num in nums: +    if prime(num): +        ret += 1 +print(ret)