n=input().split()
a=0
b=0
c=0
for i in range(1,int(n[0])+1):
sum=int(n[i])
if sum<0:
a+=1
elif sum==0:
b+=1
else:
c+=1
print("%d %d %d"%(a,b,c))
03-02
1187
07-30
588
12-22
08-08