N=int(input()) A=sum(list(map(int,input().split()))) K=(N*4-A)//2 print(N-K,K)