from bisect import * from collections import Counter N = int(input()) A = list(map(int, input().split())) A.sort() wet = 0 prev_idx = 2*N for i in range(2*N): idx = bisect_left(A, -A[i])-1 idx = min(idx, prev_idx-1) if i < idx: wet += 1 prev_idx = idx else: break dry = 0 prev_idx = -1 for i in range(2*N-1, -1, -1): idx = bisect_right(A, -A[i]) idx = max(idx, prev_idx+1) if idx < i: dry += 1 prev_idx = idx else: break moist = 0 d = Counter(A) for k, v in d.items(): if k != 0: moist += min(d[k], d[-k]) moist //= 2 moist += d[0]//2 print(wet, dry, moist)