n=int(input()) t,k=0,0 for i in map(int,input().split()): if i%4==0: k+=1 else: t+=1 print(k,t)