n = int(input()) *a, = map(int,input().split()) N = 10**5+10 pos = [0]*N neg = [0]*N for i in a: if i >= 0: pos[i] += 1 else: neg[-i] += 1 moist = sum(min(i,j) for i,j in zip(pos,neg)) + pos[0]//2 zero = pos[0] pos = [ai for ai in a if ai > 0] neg = [-ai for ai in a if ai < 0] pos.sort() neg.sort() def get(a,b): L = len(a) i = 0 res = 0 for bi in b: while i < L and a[i] <= bi: i += 1 if i < L and a[i] > bi: res += 1 i += 1 y = L-res return res + min(zero,y) + max((y-zero),0)//2 print(get(neg,pos),get(pos,neg),moist)