n_num = int(input()) tsurukame_d = input().split(" ") tsuru=0 kame=0 for tsurukame in range(n_num): if int(tsurukame_d[tsurukame])%4==0: tsuru=tsuru+1 else: kame=kame+1 print(str(tsuru)+" "+str(kame))