N=int(input()) A=list(map(int,input().split())) B=[a+2 for a in A] t=(sum(B)-N*2)//4 c=N-t print(c,t)