from collections import Counter N = input() D=[];W=[];M=Nd=Nw=0 def solve(A,B,Na,Nb): cnt = inc = 0 for a in A: while inc < Nb and a <= B[inc]: inc+=1 if inc >= Nb:continue cnt+=1;inc+=1 Na -= cnt return cnt + min(Na,M) + max(0,Na-M)/2 for a in map(int,raw_input().split()): if a < 0: D+=[-a];Nd+=1 elif a > 0: W+=[a];Nw+=1 else: M += 1 D.sort(reverse=True) W.sort(reverse=True) Cd = Counter(D) Cw = Counter(W) print solve(D,W,Nd,Nw),solve(W,D,Nw,Nd),M/2+sum(min(v,Cw[k]) for k,v in Cd.iteritems())