import java.util.Scanner;
public class HDU_oj2008 {
/*
* 统计给定的n个数中,负数、零和正数的个数*/
public static void main(String[] args) {
Scanner sn = new Scanner(System.in);
while(sn.hasNext()) {
int n = sn.nextInt();
if(n != 0) { //n为0时,不做处理
int count_Zero = 0;
int count_Neg = 0;
int count_pos = 0;
for(int i = 0; i < n; i++) {
double s = sn.nextDouble(); //注意这里输入的数值为double,否则影响数据,wrong answer
if(s > 0)
count_pos ++;
else if(s < 0)
count_Neg ++;
else
count_Zero ++;
}
System.out.println(count_Neg + " " + count_Zero + " " + count_pos);
}
}
}
}