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