# 亀が0~N匹の場合で全探索 # 亀がx匹とすると全員の足の数は2*N+2*x匹 => tot # 各a1~aNに対してtot-ai = 2 or 4かつtot - ai = 4となる数がx N = int(input()) A = list(map(int, input().split())) for x in range(N+1): tot = 2 * N + 2 * x cnt = 0 flag = True for a in A: if tot - a != 2 and tot - a != 4: flag = False if tot - a == 4: cnt += 1 if flag and cnt == x: print(N-x,x) exit()