import java.util.Scanner; public class Yuki190 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); Integer N = sc.nextInt(); int ary1[], ary2[]; ary1 = new int[100001]; ary2 = new int[100001]; Integer pn = 0, nn =0, zn=0; for(int i = 0; i < 2*N; i++){ Integer A = sc.nextInt(); if(A > 0){ ary1[A] += 1; pn += 1; } else if(A < 0){ Integer A2 = A * -1; ary2[A2] += 1; nn += 1; } else if(A == 0){ ary1[A] += 1; zn += 1; } } Integer D=0, W=0, M=0; for(int i=0; i < 100001; ++i){ if(ary1[i] > 0 && ary2[i] > 0) { int a = ary1[i]; int b = ary2[i]; int c; if(a <= b){ c = a; } else { c = b; } M += c; } } Integer Z = zn/2; M += Z; Integer cnt_d = 0, pos_d = 100001; for(int i = 100000; i >= 0; i--){ if(ary2[i] > 0){ for(int j = i+1; j < pos_d; j++){ if(ary1[j] > 0) cnt_d += ary1[j]; } pos_d = i+1; int a = ary2[i]; int b = cnt_d; int c; if(a <= b){ c = a; } else { c = b; } D += c; cnt_d -= c; } } Integer dn1 = pn - D; int a_d = dn1; int b_d = zn; int c_d; if(a_d <= b_d){ c_d = a_d; } else { c_d = b_d; } W += c_d; dn1 -= c_d; Integer dn2 = dn1 / 2; D += dn2; Integer cnt_w = 0, pos_w = 100001; for(int i = 100000; i >= 0; i--){ if(ary1[i] > 0){ for(int j = i+1; j < pos_w; j++){ if(ary2[j] > 0) cnt_w += ary2[j]; } pos_w = i+1; int a = ary1[i]; int b = cnt_w; int c; if(a <= b){ c = a; } else { c = b; } W += c; cnt_w -= c; } } Integer wn1 = nn - W; int a_w = wn1; int b_w = zn; int c_w; if(a_w <= b_w){ c_w = a_w; } else { c_w = b_w; } W += c_w; wn1 -= c_w; Integer wn2 = wn1 / 2; W += wn2; System.out.println(W + " " + D + " " + M); } }