#include <iostream>
using namespace std;
int main()
{
int n;
while(cin >> n && n!=0)
{
int n1 = 0;
int n2 = 0;
int n3 = 0;
while(n--)
{
double x;
cin >> x;
if(x<0) n1++;
else if(x==0) n2++;
else n3++;
}
cout << n1 << " " <<n2 << " " << n3 <<endl;
}
return 0;
}