n,neg,odd,eve,m=int(input()),0,0,0,[int(i) for i in input().split()] for i in m: if i<0: neg+=1 elif i%2==0 : eve+=1 else: odd+=1 print("{0} {1} {2}".format(odd,eve,neg))