c=0

for _ in[0]*int(eval(input())):

 x=int(eval(input()))

 if 2 in[x,pow(2,x,x)]:c+=1

print(c)

import sys

eval(input());c=0

for e in sys.stdin:

 x=int(e)

 if 2 in[x,pow(2,x,x)]:c+=1

print(c)

c = 0
for _ in [0] * int(eval(input())):
    x = int(eval(input()))
    if 2 in [x, pow(2, x, x)]:
        c += 1
print(c)

import sys

eval(input())
c = 0
for e in sys.stdin:
    x = int(e)
    if 2 in [x, pow(2, x, x)]:
        c += 1
print(c)

+import sys + +eval(input()) -for _ in [0] * int(eval(input())): -    x = int(eval(input())) +for e in sys.stdin: +    x = int(e)