from collections import Counter N = int(input()) A = list(map(int, input().split())) p = [] z = [] n = [] for a in A: if a > 0: p.append(a) elif a == 0: z.append(a) else: n.append(a) # dry dry = 0 pos = sorted(p) neg = sorted(n, reverse=True) zero = z[:] while pos and neg: if pos[-1] + neg[-1] >= 0: pos.pop() else: pos.pop() neg.pop() dry += 1 while neg and zero: dry += 1 neg.pop() zero.pop() dry += len(neg) // 2 # wet wet = 0 pos = sorted(p) neg = sorted(n, reverse=True) zero = z[:] while pos and neg: if pos[-1] + neg[-1] <= 0: neg.pop() else: pos.pop() neg.pop() wet += 1 while pos and zero: wet += 1 pos.pop() zero.pop() wet += len(pos) // 2 # moist moist = len(z) // 2 cp = Counter(p) cn = Counter(n) for k, v in cp.items(): moist += min(v, cn[-k]) print(dry, wet, moist)