k=0
for q in range(6):
n=int(input())
if n%5==0:
k+=1
if k==0:
print("takih chisel net")
else:
print(k)
k=0
for q in range(6):
n=int(input())
if n%5==0:
k+=1
if k==0:
print("takih chisel net")
else:
print(k)