def solve(a1,a2): a1.sort() a2.sort() c=0 for i in reversed(range(len(a1))): while len(a2)>0 and a2[-1]>=a1[i]: a2.pop() if len(a2)>0: c+=1 a2.pop() else: c+=(i+1)//2 break return c n=int(input()) a=list(map(int,input().split())) ad=solve([abs(a[i]) for i in range(n*2) if a[i]<0],[abs(a[i]) for i in range(n*2) if not a[i]<0]) aw=solve([abs(a[i]) for i in range(n*2) if a[i]>0],[abs(a[i]) for i in range(n*2) if not a[i]>0]) am=0 L=10**5 c1=[0]*(L+1) c2=[0]*(L+1) for v in a: if v>=0: c1[abs(v)]+=1 else: c2[abs(v)]+=1 for i in range(1,L+1): am+=min(c1[i],c2[i]) am+=c1[0]//2 print(ad,aw,am)