def find_max_moist(Ap, Am, np, nm, n0): c = p = m = 0 while p < np and m < nm: if Ap[p] == Am[m]: c += 1 p += 1 m += 1 elif Ap[p] < Am[m]: m += 1 else: p += 1 return c + n0 // 2 def find_max_wet(Ap, Ar, np, nr): c = p = r = 0 while p < np and r < nr: if Ap[p] < Ar[r]: c += 1 p += 1 r += 1 return c + max((np - p) // 2, 0) N = int(input()) As = list(map(int, input().split())) Ap = [-a for a in As if a > 0] Am = [a for a in As if a < 0] Ap.sort() Am.sort() np = len(Ap) nm = len(Am) n0 = 2 * N - np - nm A0 = [0] * n0 dry = find_max_wet(Am, Ap+A0, nm, np + n0) wet = find_max_wet(Ap, Am+A0, np, nm + n0) moist = find_max_moist(Ap, Am, np, nm, n0) print(dry, wet, moist)